From b5f8ac232b01d615430c8b3b4b87f021b509efdf Mon Sep 17 00:00:00 2001 From: Anthony Bachour Date: Mon, 6 May 2024 16:42:59 -0400 Subject: [PATCH 1/3] add option to exclude unbound numeric ranges --- dist/typesense-instantsearch-adapter.js | 14465 +++++++++------- dist/typesense-instantsearch-adapter.js.map | 2 +- dist/typesense-instantsearch-adapter.min.js | 2 +- ...typesense-instantsearch-adapter.min.js.map | 2 +- index.d.ts | 1 + lib/Configuration.js | 4 +- lib/Configuration.js.map | 2 +- lib/SearchRequestAdapter.js | 9 +- lib/SearchRequestAdapter.js.map | 2 +- src/Configuration.js | 1 + src/SearchRequestAdapter.js | 9 +- 11 files changed, 8087 insertions(+), 6412 deletions(-) diff --git a/dist/typesense-instantsearch-adapter.js b/dist/typesense-instantsearch-adapter.js index 4f75564..4ac659f 100644 --- a/dist/typesense-instantsearch-adapter.js +++ b/dist/typesense-instantsearch-adapter.js @@ -11,3632 +11,4681 @@ return /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/axios/index.js": -/*!*************************************!*\ - !*** ./node_modules/axios/index.js ***! - \*************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/axios/lib/axios.js"); +/***/ "./src/Configuration.js": +/*!******************************!*\ + !*** ./src/Configuration.js ***! + \******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -/***/ }), +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Configuration: () => (/* binding */ Configuration) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); -/***/ "./node_modules/axios/lib/adapters/xhr.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/adapters/xhr.js ***! - \************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { -"use strict"; -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); -var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/axios/lib/core/settle.js"); -var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/axios/lib/helpers/cookies.js"); -var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js"); -var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./node_modules/axios/lib/core/buildFullPath.js"); -var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/axios/lib/helpers/parseHeaders.js"); -var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); -var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/axios/lib/core/createError.js"); -var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "./node_modules/axios/lib/defaults/transitional.js"); -var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); +var Configuration = /*#__PURE__*/function () { + function Configuration() { + var _this$server$cacheSea, + _options$additionalSe, + _ref, + _this$additionalSearc, + _ref2, + _this$additionalSearc2, + _ref3, + _this$additionalSearc3, + _ref4, + _this$additionalSearc4, + _options$geoLocationF, + _options$facetableFie, + _options$collectionSp, + _this = this, + _options$flattenGroup, + _options$facetByOptio, + _options$filterByOpti, + _options$sortByOption, + _options$collectionSp2, + _options$collectionSp3, + _options$collectionSp4, + _options$useExcludeFo; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Configuration); + this.server = options.server || { + nodes: [{ + host: "localhost", + port: "8108", + path: "", + protocol: "http" + }] + }; + this.server.cacheSearchResultsForSeconds = (_this$server$cacheSea = this.server.cacheSearchResultsForSeconds) !== null && _this$server$cacheSea !== void 0 ? _this$server$cacheSea : 2 * 60; + this.additionalSearchParameters = (_options$additionalSe = options.additionalSearchParameters) !== null && _options$additionalSe !== void 0 ? _options$additionalSe : {}; + this.additionalSearchParameters.query_by = (_ref = (_this$additionalSearc = this.additionalSearchParameters.queryBy) !== null && _this$additionalSearc !== void 0 ? _this$additionalSearc : this.additionalSearchParameters.query_by) !== null && _ref !== void 0 ? _ref : ""; + this.additionalSearchParameters.preset = (_ref2 = (_this$additionalSearc2 = this.additionalSearchParameters.preset) !== null && _this$additionalSearc2 !== void 0 ? _this$additionalSearc2 : this.additionalSearchParameters.preset) !== null && _ref2 !== void 0 ? _ref2 : ""; + this.additionalSearchParameters.sort_by = (_ref3 = (_this$additionalSearc3 = this.additionalSearchParameters.sortBy) !== null && _this$additionalSearc3 !== void 0 ? _this$additionalSearc3 : this.additionalSearchParameters.sort_by) !== null && _ref3 !== void 0 ? _ref3 : ""; + this.additionalSearchParameters.highlight_full_fields = (_ref4 = (_this$additionalSearc4 = this.additionalSearchParameters.highlightFullFields) !== null && _this$additionalSearc4 !== void 0 ? _this$additionalSearc4 : this.additionalSearchParameters.highlight_full_fields) !== null && _ref4 !== void 0 ? _ref4 : this.additionalSearchParameters.query_by; + this.geoLocationField = (_options$geoLocationF = options.geoLocationField) !== null && _options$geoLocationF !== void 0 ? _options$geoLocationF : "_geoloc"; + this.facetableFieldsWithSpecialCharacters = (_options$facetableFie = options.facetableFieldsWithSpecialCharacters) !== null && _options$facetableFie !== void 0 ? _options$facetableFie : []; + this.collectionSpecificSearchParameters = (_options$collectionSp = options.collectionSpecificSearchParameters) !== null && _options$collectionSp !== void 0 ? _options$collectionSp : {}; + Object.keys(this.collectionSpecificSearchParameters).forEach(function (collection) { + var _params$queryBy, _params$preset, _params$sortBy, _ref5, _ref6, _params$highlightFull; + var params = _this.collectionSpecificSearchParameters[collection]; + params.query_by = (_params$queryBy = params.queryBy) !== null && _params$queryBy !== void 0 ? _params$queryBy : params.query_by; + params.preset = (_params$preset = params.preset) !== null && _params$preset !== void 0 ? _params$preset : params.preset; + params.sort_by = (_params$sortBy = params.sortBy) !== null && _params$sortBy !== void 0 ? _params$sortBy : params.sort_by; + params.highlight_full_fields = (_ref5 = (_ref6 = (_params$highlightFull = params.highlightFullFields) !== null && _params$highlightFull !== void 0 ? _params$highlightFull : params.highlight_full_fields) !== null && _ref6 !== void 0 ? _ref6 : _this.additionalSearchParameters.highlight_full_fields) !== null && _ref5 !== void 0 ? _ref5 : params.query_by; -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - var responseType = config.responseType; - var onCanceled; - function done() { - if (config.cancelToken) { - config.cancelToken.unsubscribe(onCanceled); + // Remove undefined values + Object.keys(params).forEach(function (key) { + return params[key] === undefined ? delete params[key] : {}; + }); + }); + this.renderingContent = options.renderingContent; + this.flattenGroupedHits = (_options$flattenGroup = options.flattenGroupedHits) !== null && _options$flattenGroup !== void 0 ? _options$flattenGroup : true; + this.facetByOptions = (_options$facetByOptio = options.facetByOptions) !== null && _options$facetByOptio !== void 0 ? _options$facetByOptio : {}; + this.filterByOptions = (_options$filterByOpti = options.filterByOptions) !== null && _options$filterByOpti !== void 0 ? _options$filterByOpti : {}; + this.sortByOptions = (_options$sortByOption = options.sortByOptions) !== null && _options$sortByOption !== void 0 ? _options$sortByOption : {}; + this.collectionSpecificFacetByOptions = (_options$collectionSp2 = options.collectionSpecificFacetByOptions) !== null && _options$collectionSp2 !== void 0 ? _options$collectionSp2 : {}; + this.collectionSpecificFilterByOptions = (_options$collectionSp3 = options.collectionSpecificFilterByOptions) !== null && _options$collectionSp3 !== void 0 ? _options$collectionSp3 : {}; + this.collectionSpecificSortByOptions = (_options$collectionSp4 = options.collectionSpecificSortByOptions) !== null && _options$collectionSp4 !== void 0 ? _options$collectionSp4 : {}; + this.useExcludeForUnboundNumericRange = (_options$useExcludeFo = options.useExcludeForUnboundNumericRange) !== null && _options$useExcludeFo !== void 0 ? _options$useExcludeFo : false; + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Configuration, [{ + key: "validate", + value: function validate() { + // Warn if camelCased parameters are used, suggest using snake_cased parameters instead + if (this.additionalSearchParameters.queryBy || Object.values(this.collectionSpecificSearchParameters).some(function (c) { + return c.queryBy; + })) { + console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version." + " We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."); } - if (config.signal) { - config.signal.removeEventListener('abort', onCanceled); + /* + * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or + * All collectionSpecificSearchParameters need to have query_by or preset + * + * */ + if (this.additionalSearchParameters.query_by.length === 0 && this.additionalSearchParameters.preset.length === 0 && (Object.keys(this.collectionSpecificSearchParameters).length === 0 || Object.values(this.collectionSpecificSearchParameters).some(function (c) { + return (c.query_by || "").length === 0 && (c.preset || "").length === 0; + }))) { + throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set."); } } + }]); +}(); - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } +/***/ }), - var request = new XMLHttpRequest(); +/***/ "./src/FacetSearchResponseAdapter.js": +/*!*******************************************!*\ + !*** ./src/FacetSearchResponseAdapter.js ***! + \*******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ FacetSearchResponseAdapter: () => (/* binding */ FacetSearchResponseAdapter) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _support_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./support/utils */ "./src/support/utils.js"); - var fullPath = buildFullPath(config.baseURL, config.url); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - // Set the request timeout in MS - request.timeout = config.timeout; - function onloadend() { - if (!request) { - return; - } - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - // Clean up request - request = null; +var FacetSearchResponseAdapter = /*#__PURE__*/function () { + function FacetSearchResponseAdapter(typesenseResponse, instantsearchRequest) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, FacetSearchResponseAdapter); + this.typesenseResponse = typesenseResponse; + this.instantsearchRequest = instantsearchRequest; + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(FacetSearchResponseAdapter, [{ + key: "_adaptFacetHits", + value: function _adaptFacetHits(typesenseFacetCounts) { + var _this = this; + var adaptedResult = {}; + var facet = typesenseFacetCounts.find(function (facet) { + return facet.field_name === _this.instantsearchRequest.params.facetName; + }); + adaptedResult = facet.counts.map(function (facetCount) { + return { + value: facetCount.value, + highlighted: _this._adaptHighlightTag(facetCount.highlighted, _this.instantsearchRequest.params.highlightPreTag, _this.instantsearchRequest.params.highlightPostTag), + count: facetCount.count + }; + }); + return adaptedResult; } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); + }, { + key: "adapt", + value: function adapt() { + var adaptedResult = { + facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts), + exhaustiveFacetsCount: true, + processingTimeMS: this.typesenseResponse.search_time_ms }; + return adaptedResult; } + }]); +}(); +Object.assign(FacetSearchResponseAdapter.prototype, _support_utils__WEBPACK_IMPORTED_MODULE_2__.utils); - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } +/***/ }), - reject(createError('Request aborted', config, 'ECONNABORTED', request)); +/***/ "./src/SearchRequestAdapter.js": +/*!*************************************!*\ + !*** ./src/SearchRequestAdapter.js ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // Clean up request - request = null; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SearchRequestAdapter: () => (/* binding */ SearchRequestAdapter) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__); - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - // Clean up request - request = null; - }; - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; - var transitional = config.transitional || transitionalDefaults; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(createError( - timeoutErrorMessage, - config, - transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', - request)); - // Clean up request - request = null; - }; - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = config.responseType; - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken || config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = function(cancel) { - if (!request) { - return; - } - reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel); - request.abort(); - request = null; - }; +var _excluded = ["q", "conversation", "conversation_id", "conversation_model_id"]; - config.cancelToken && config.cancelToken.subscribe(onCanceled); - if (config.signal) { - config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); +var SearchRequestAdapter = /*#__PURE__*/function () { + function SearchRequestAdapter(instantsearchRequests, typesenseClient, configuration) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__["default"])(this, SearchRequestAdapter); + this.instantsearchRequests = instantsearchRequests; + this.typesenseClient = typesenseClient; + this.configuration = configuration; + this.additionalSearchParameters = configuration.additionalSearchParameters; + this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters; + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__["default"])(SearchRequestAdapter, [{ + key: "_shouldUseExactMatchForField", + value: function _shouldUseExactMatchForField(fieldName, collectionName) { + var _this$configuration$c, _this$configuration$f; + if (((_this$configuration$c = this.configuration.collectionSpecificFilterByOptions) === null || _this$configuration$c === void 0 || (_this$configuration$c = _this$configuration$c[collectionName]) === null || _this$configuration$c === void 0 || (_this$configuration$c = _this$configuration$c[fieldName]) === null || _this$configuration$c === void 0 ? void 0 : _this$configuration$c.exactMatch) === false || ((_this$configuration$f = this.configuration.filterByOptions) === null || _this$configuration$f === void 0 || (_this$configuration$f = _this$configuration$f[fieldName]) === null || _this$configuration$f === void 0 ? void 0 : _this$configuration$f.exactMatch) === false) { + return false; + } else { + return true; } } + }, { + key: "_adaptFacetFilters", + value: function _adaptFacetFilters(facetFilters, collectionName) { + var _this = this; + var adaptedResult = ""; + if (!facetFilters) { + return adaptedResult; + } - if (!requestData) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; - - -/***/ }), - -/***/ "./node_modules/axios/lib/axios.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/axios.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; + /** + * Need to transform: + * facetFilters = [["field1:value1", "field1:value2"], "field2:value3", "field2:value4"] + * + * Into this: + * field1:=[value1,value2] && field2:=value3 && field2:=value4 + * + * Steps: + * - For each item in facetFilters + * - If item is array + * - OR values together. + * - Warn if field names are not the same + * - If item is string, convert to facet:=value format + * - Join strings by && + */ + var transformedTypesenseFilters = facetFilters.map(function (item) { + if (Array.isArray(item)) { + // Need to transform: + // facetFilters = ["field1:value1", "field1:value2", "facetN:valueN"] + // + // Into this: + // intermediateFacetFilters = { + // "field1": ["value1", "value2"], + // "fieldN": ["valueN"] + // } -var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js"); -var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js"); -var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/axios/lib/core/Axios.js"); -var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js"); -var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/axios/lib/defaults/index.js"); + var intermediateFacetFilters = {}; + item.forEach(function (facetFilter) { + var _this$_parseFacetFilt = _this._parseFacetFilter(facetFilter), + fieldName = _this$_parseFacetFilt.fieldName, + fieldValue = _this$_parseFacetFilt.fieldValue; + intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || []; + intermediateFacetFilters[fieldName].push(fieldValue); + }); + if (Object.keys(intermediateFacetFilters).length > 1) { + console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(intermediateFacetFilters).join(","))); + } -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); + // Pick first value from intermediateFacetFilters + var fieldName = Object.keys(intermediateFacetFilters)[0]; + var fieldValues = intermediateFacetFilters[fieldName]; - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); + // Need to transform: + // intermediateFacetFilters = { + // "field1": ["value1", "value2"], + // } + // + // Into this: + // field1:=[value1,value2] - // Copy context to instance - utils.extend(instance, context); + // Partition values into included and excluded values + var _fieldValues$reduce = fieldValues.reduce(function (result, fieldValue) { + if (fieldValue.startsWith("-") && !_this._isNumber(fieldValue)) { + result[0].push(fieldValue.substring(1)); + } else { + result[1].push(fieldValue); + } + return result; + }, [[], []]), + _fieldValues$reduce2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_fieldValues$reduce, 2), + excludedFieldValues = _fieldValues$reduce2[0], + includedFieldValues = _fieldValues$reduce2[1]; + var typesenseFilterStringComponents = []; + if (includedFieldValues.length > 0) { + var operator = _this._shouldUseExactMatchForField(fieldName, collectionName) ? ":=" : ":"; + typesenseFilterStringComponents.push("".concat(fieldName).concat(operator, "[").concat(includedFieldValues.map(function (v) { + return _this._escapeFacetValue(v); + }).join(","), "]")); + } + if (excludedFieldValues.length > 0) { + var _operator = _this._shouldUseExactMatchForField(fieldName, collectionName) ? ":!=" : ":!"; + typesenseFilterStringComponents.push("".concat(fieldName).concat(_operator, "[").concat(excludedFieldValues.map(function (v) { + return _this._escapeFacetValue(v); + }).join(","), "]")); + } + var typesenseFilterString = typesenseFilterStringComponents.filter(function (f) { + return f; + }).join(" && "); + return typesenseFilterString; + } else { + // Need to transform: + // fieldName:fieldValue + // Into + // fieldName:=fieldValue - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }; + var _this$_parseFacetFilt2 = _this._parseFacetFilter(item), + _fieldName = _this$_parseFacetFilt2.fieldName, + fieldValue = _this$_parseFacetFilt2.fieldValue; + var _typesenseFilterString; + if (fieldValue.startsWith("-") && !_this._isNumber(fieldValue)) { + var _operator2 = _this._shouldUseExactMatchForField(_fieldName, collectionName) ? ":!=" : ":!"; + _typesenseFilterString = "".concat(_fieldName).concat(_operator2, "[").concat(_this._escapeFacetValue(fieldValue.substring(1)), "]"); + } else { + var _operator3 = _this._shouldUseExactMatchForField(_fieldName, collectionName) ? ":=" : ":"; + _typesenseFilterString = "".concat(_fieldName).concat(_operator3, "[").concat(_this._escapeFacetValue(fieldValue), "]"); + } + return _typesenseFilterString; + } + }); + adaptedResult = transformedTypesenseFilters.join(" && "); + // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`); - return instance; -} + return adaptedResult; + } + }, { + key: "_parseFacetFilter", + value: function _parseFacetFilter(facetFilter) { + var _this$configuration$f2; + var filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue; -// Create the default instance to be exported -var axios = createInstance(defaults); + // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`. + // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that. + if (((_this$configuration$f2 = this.configuration.facetableFieldsWithSpecialCharacters) === null || _this$configuration$f2 === void 0 ? void 0 : _this$configuration$f2.length) > 0) { + // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + var sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.flat().map(function (f) { + return f.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + }); + filterStringMatchingRegex = new RegExp("^(".concat(sanitizedFacetableFieldsWithSpecialCharacters.join("|"), "):(.*)$")); + facetFilterMatches = facetFilter.match(filterStringMatchingRegex); + if (facetFilterMatches != null) { + fieldName = "".concat(facetFilterMatches[1]); + fieldValue = "".concat(facetFilterMatches[2]); + return { + fieldName: fieldName, + fieldValue: fieldValue + }; + } + } -// Expose Axios class to allow class inheritance -axios.Axios = Axios; + // If we haven't found any matches yet + // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values + filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX; + facetFilterMatches = facetFilter.match(filterStringMatchingRegex); -// Expose Cancel & CancelToken -axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); -axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js"); -axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js"); -axios.VERSION = (__webpack_require__(/*! ./env/data */ "./node_modules/axios/lib/env/data.js").version); + // console.log(filterStringMatchingRegex); + // console.log(facetFilter); + // console.log(facetFilterMatches); -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/axios/lib/helpers/spread.js"); + if (facetFilterMatches == null) { + console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(facetFilter, "` with the Regex `").concat(filterStringMatchingRegex, "`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")); + } else { + fieldName = "".concat(facetFilterMatches[1]).concat(facetFilterMatches[2]); + fieldValue = "".concat(facetFilterMatches[3]); + } + return { + fieldName: fieldName, + fieldValue: fieldValue + }; + } + }, { + key: "_escapeFacetValue", + value: function _escapeFacetValue(value) { + // Don't escape booleans, integers or floats + if (typeof value === "boolean" || value === "true" || value === "false" || this._isNumber(value)) { + return value; + } + return "`".concat(value, "`"); + } + }, { + key: "_isNumber", + value: function _isNumber(value) { + return Number.isInteger(value % 1) || + // Mod 1 will automatically try converting string values to integer/float + !!(value % 1); // Is Float + } + }, { + key: "_adaptNumericFilters", + value: function _adaptNumericFilters(numericFilters) { + var _this2 = this; + // Need to transform this: + // ["field1<=634", "field1>=289", "field2<=5", "field3>=3"] + // to: + // "field1:=[634..289] && field2:<=5 && field3:>=3" + var adaptedResult = ""; + if (!numericFilters) { + return adaptedResult; + } -// Expose isAxiosError -axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_modules/axios/lib/helpers/isAxiosError.js"); - -module.exports = axios; - -// Allow use of default import syntax in TypeScript -module.exports["default"] = axios; - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/Cancel.js": -/*!*************************************************!*\ - !*** ./node_modules/axios/lib/cancel/Cancel.js ***! - \*************************************************/ -/***/ ((module) => { - -"use strict"; + // Transform to intermediate structure: + // { + // field1: { + // "<=": 634, + // ">=": 289 + // }, + // field2: { + // "<=": 5 + // }, + // field3: { + // ">=": 3 + // } + // }; + var filtersHash = {}; + numericFilters.forEach(function (filter) { + var _this2$_parseNumericF = _this2._parseNumericFilter(filter), + fieldName = _this2$_parseNumericF.fieldName, + operator = _this2$_parseNumericF.operator, + fieldValue = _this2$_parseNumericF.fieldValue; + filtersHash[fieldName] = filtersHash[fieldName] || {}; + filtersHash[fieldName][operator] = fieldValue; + }); + // Transform that to: + // "field1:=[634..289] && field2:<=5 && field3:>=3" + var adaptedFilters = []; + Object.keys(filtersHash).forEach(function (field) { + if (filtersHash[field]["<="] != null && filtersHash[field][">="] != null) { + if (_this2.configuration.useExcludeForUnboundNumericRange && filtersHash[field][">="] > filtersHash[field]["<="]) { + //exclude unbound range: + adaptedFilters.push("".concat(field, ":!=[").concat(filtersHash[field]["<="], "..").concat(filtersHash[field][">="], "]")); + } else { + adaptedFilters.push("".concat(field, ":=[").concat(filtersHash[field][">="], "..").concat(filtersHash[field]["<="], "]")); + } + } else if (filtersHash[field]["<="] != null) { + adaptedFilters.push("".concat(field, ":<=").concat(filtersHash[field]["<="])); + } else if (filtersHash[field][">="] != null) { + adaptedFilters.push("".concat(field, ":>=").concat(filtersHash[field][">="])); + } else if (filtersHash[field]["="] != null) { + adaptedFilters.push("".concat(field, ":=").concat(filtersHash[field]["="])); + } else { + console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(filtersHash[field]))); + } + }); + adaptedResult = adaptedFilters.join(" && "); + return adaptedResult; + } + }, { + key: "_parseNumericFilter", + value: function _parseNumericFilter(numericFilter) { + var _this$configuration$f3; + var filterStringMatchingRegex, numericFilterMatches; + var fieldName, operator, fieldValue; -/** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function Cancel(message) { - this.message = message; -} + // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly. + // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that. + if (((_this$configuration$f3 = this.configuration.facetableFieldsWithSpecialCharacters) === null || _this$configuration$f3 === void 0 ? void 0 : _this$configuration$f3.length) > 0) { + // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + var sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(function (f) { + return f.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + }); + filterStringMatchingRegex = new RegExp("^(".concat(sanitizedFacetableFieldsWithSpecialCharacters.join("|"), ")(<=|>=|>|<|=)(.*)$")); + numericFilterMatches = numericFilter.match(filterStringMatchingRegex); + if (numericFilterMatches != null) { + // If no matches are found or if the above didn't trigger, fall back to the default regex + var _numericFilterMatches = numericFilterMatches; + var _numericFilterMatches2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_numericFilterMatches, 4); + fieldName = _numericFilterMatches2[1]; + operator = _numericFilterMatches2[2]; + fieldValue = _numericFilterMatches2[3]; + return { + fieldName: fieldName, + operator: operator, + fieldValue: fieldValue + }; + } + } -Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); -}; + // If we haven't found any matches yet, fall back to the default regex + filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX; + numericFilterMatches = numericFilter.match(filterStringMatchingRegex); -Cancel.prototype.__CANCEL__ = true; + // console.log(filterStringMatchingRegex); + // console.log(numericFilter); + // console.log(numericFilterMatches); -module.exports = Cancel; + if (numericFilterMatches == null) { + console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(numericFilter, "` with the Regex `").concat(filterStringMatchingRegex, "`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")); + } else { + var _numericFilterMatches3 = numericFilterMatches; + var _numericFilterMatches4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_numericFilterMatches3, 4); + fieldName = _numericFilterMatches4[1]; + operator = _numericFilterMatches4[2]; + fieldValue = _numericFilterMatches4[3]; + } + return { + fieldName: fieldName, + operator: operator, + fieldValue: fieldValue + }; + } + }, { + key: "_adaptGeoFilter", + value: function _adaptGeoFilter(_ref) { + var insideBoundingBox = _ref.insideBoundingBox, + aroundRadius = _ref.aroundRadius, + aroundLatLng = _ref.aroundLatLng, + insidePolygon = _ref.insidePolygon; + // Give this parameter first priority if it exists, since + if (insideBoundingBox) { + var x1, y1, x2, y2; + if (Array.isArray(insideBoundingBox)) { + var _insideBoundingBox$fl = insideBoundingBox.flat(); + var _insideBoundingBox$fl2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_insideBoundingBox$fl, 4); + x1 = _insideBoundingBox$fl2[0]; + y1 = _insideBoundingBox$fl2[1]; + x2 = _insideBoundingBox$fl2[2]; + y2 = _insideBoundingBox$fl2[3]; + } else { + var _insideBoundingBox$sp = insideBoundingBox.split(","); + var _insideBoundingBox$sp2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_insideBoundingBox$sp, 4); + x1 = _insideBoundingBox$sp2[0]; + y1 = _insideBoundingBox$sp2[1]; + x2 = _insideBoundingBox$sp2[2]; + y2 = _insideBoundingBox$sp2[3]; + } + return "".concat(this.configuration.geoLocationField, ":(").concat(x1, ", ").concat(y1, ", ").concat(x1, ", ").concat(y2, ", ").concat(x2, ", ").concat(y2, ", ").concat(x2, ", ").concat(y1, ")"); + } + if (aroundLatLng || aroundRadius) { + if (!aroundRadius || aroundRadius === "all") { + throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. " + "So the `aroundRadius` parameter is required when `aroundLatLng` is used. " + "If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget)."); + } + var adaptedAroundRadius = "".concat(parseFloat(aroundRadius) / 1000, " km"); // aroundRadius is in meters + return "".concat(this.configuration.geoLocationField, ":(").concat(aroundLatLng, ", ").concat(adaptedAroundRadius, ")"); + } + if (insidePolygon) { + var coordinates = insidePolygon; + if (Array.isArray(insidePolygon)) { + coordinates = insidePolygon.flat().join(","); + } + return "".concat(this.configuration.geoLocationField, ":(").concat(coordinates, ")"); + } + } + }, { + key: "_adaptFilters", + value: function _adaptFilters(instantsearchParams, collectionName) { + var adaptedFilters = []; + // `filters` can be used with the `Configure` widget + // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format. + if (instantsearchParams.filters) { + adaptedFilters.push(instantsearchParams.filters); + } + adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName)); + adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters)); + adaptedFilters.push(this._adaptGeoFilter(instantsearchParams)); + return adaptedFilters.filter(function (filter) { + return filter && filter !== ""; + }).join(" && "); + } + }, { + key: "_adaptIndexName", + value: function _adaptIndexName(indexName) { + return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]; + } + }, { + key: "_adaptSortBy", + value: function _adaptSortBy(indexName) { + return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]; + } + }, { + key: "_adaptFacetBy", + value: function _adaptFacetBy(facets, collectionName) { + var _this3 = this; + return [facets].flat().map(function (facet) { + var _this3$configuration$; + if ((_this3$configuration$ = _this3.configuration.collectionSpecificFacetByOptions) !== null && _this3$configuration$ !== void 0 && (_this3$configuration$ = _this3$configuration$[collectionName]) !== null && _this3$configuration$ !== void 0 && _this3$configuration$[facet]) { + return "".concat(facet).concat(_this3.configuration.collectionSpecificFacetByOptions[collectionName][facet]); + } else if (_this3.configuration.facetByOptions[facet]) { + return "".concat(facet).concat(_this3.configuration.facetByOptions[facet]); + } else { + return facet; + } + }).join(","); + } + }, { + key: "_buildSearchParameters", + value: function _buildSearchParameters(instantsearchRequest) { + var _this$configuration$c2, _this$configuration$s; + var params = instantsearchRequest.params; + var indexName = instantsearchRequest.indexName; + var adaptedCollectionName = this._adaptIndexName(indexName); -/***/ }), + // Convert all common parameters to snake case + var snakeCasedAdditionalSearchParameters = {}; + for (var _i = 0, _Object$entries = Object.entries(this.additionalSearchParameters); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; + snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value; + } -/***/ "./node_modules/axios/lib/cancel/CancelToken.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! - \******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + // Override, collection specific parameters + if (this.collectionSpecificSearchParameters[adaptedCollectionName]) { + for (var _i2 = 0, _Object$entries2 = Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName]); _i2 < _Object$entries2.length; _i2++) { + var _Object$entries2$_i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_Object$entries2[_i2], 2), + _key = _Object$entries2$_i[0], + _value = _Object$entries2$_i[1]; + snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(_key)] = _value; + } + } + var typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters); + var adaptedSortBy = this._adaptSortBy(indexName); + Object.assign(typesenseSearchParams, { + collection: adaptedCollectionName, + q: params.query === "" || params.query === undefined ? "*" : params.query, + facet_by: snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName), + filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by, + sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by, + max_facet_values: params.maxValuesPerFacet, + page: (params.page || 0) + 1 + }); + if (params.hitsPerPage) { + typesenseSearchParams.per_page = params.hitsPerPage; + } + if (params.facetQuery) { + typesenseSearchParams.facet_query = "".concat(params.facetName, ":").concat(params.facetQuery); + typesenseSearchParams.per_page = 0; + } -"use strict"; + // If a custom vector query is specified, set q=* + if (params.typesenseVectorQuery) { + typesenseSearchParams.vector_query = params.typesenseVectorQuery; + } + // Allow for conditional disabling of overrides, for particular sort orders + var sortByOption = ((_this$configuration$c2 = this.configuration.collectionSpecificSortByOptions) === null || _this$configuration$c2 === void 0 || (_this$configuration$c2 = _this$configuration$c2[adaptedCollectionName]) === null || _this$configuration$c2 === void 0 ? void 0 : _this$configuration$c2[typesenseSearchParams["sort_by"]]) || ((_this$configuration$s = this.configuration.sortByOptions) === null || _this$configuration$s === void 0 ? void 0 : _this$configuration$s[typesenseSearchParams["sort_by"]]); + if ((sortByOption === null || sortByOption === void 0 ? void 0 : sortByOption["enable_overrides"]) != null) { + typesenseSearchParams["enable_overrides"] = sortByOption["enable_overrides"]; + } -var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); + // console.log(params); + // console.log(typesenseSearchParams); -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ -function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - - // eslint-disable-next-line func-names - this.promise.then(function(cancel) { - if (!token._listeners) return; - - var i; - var l = token._listeners.length; - - for (i = 0; i < l; i++) { - token._listeners[i](cancel); + // Filter out empty or null values, so we don't accidentally override values set in presets + // eslint-disable-next-line no-unused-vars + return Object.fromEntries(Object.entries(typesenseSearchParams).filter(function (_ref2) { + var _ref3 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_ref2, 2), + _ = _ref3[0], + v = _ref3[1]; + return v != null && v !== ""; + })); } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = function(onfulfilled) { - var _resolve; - // eslint-disable-next-line func-names - var promise = new Promise(function(resolve) { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; + }, { + key: "_camelToSnakeCase", + value: function _camelToSnakeCase(str) { + return str.split(/(?=[A-Z])/).join("_").toLowerCase(); } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); -} - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } -}; - -/** - * Subscribe to the cancel signal - */ - -CancelToken.prototype.subscribe = function subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } -}; - -/** - * Unsubscribe from the cancel signal - */ - -CancelToken.prototype.unsubscribe = function unsubscribe(listener) { - if (!this._listeners) { - return; - } - var index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } -}; - -/** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ -CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; -}; - -module.exports = CancelToken; - + }, { + key: "request", + value: function () { + var _request = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().mark(function _callee() { + var _this4 = this, + _searches$, + _searches$2; + var searches, commonParams, _searches$3, q, conversation, conversation_id, conversation_model_id; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + // console.log(this.instantsearchRequests); + searches = this.instantsearchRequests.map(function (instantsearchRequest) { + return _this4._buildSearchParameters(instantsearchRequest); + }); // If this is a conversational search, then move conversation related params to query params + commonParams = {}; + if (((_searches$ = searches[0]) === null || _searches$ === void 0 ? void 0 : _searches$.conversation) === true || ((_searches$2 = searches[0]) === null || _searches$2 === void 0 ? void 0 : _searches$2.conversation) === "true") { + _searches$3 = searches[0], q = _searches$3.q, conversation = _searches$3.conversation, conversation_id = _searches$3.conversation_id, conversation_model_id = _searches$3.conversation_model_id; + commonParams = { + q: q, + conversation: conversation, + conversation_id: conversation_id, + conversation_model_id: conversation_model_id + }; + searches = searches.map(function (searchParams) { + // eslint-disable-next-line no-unused-vars + var q = searchParams.q, + conversation = searchParams.conversation, + conversation_id = searchParams.conversation_id, + conversation_model_id = searchParams.conversation_model_id, + modifiedSearchParams = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(searchParams, _excluded); + return modifiedSearchParams; + }); + } + return _context.abrupt("return", this.typesenseClient.multiSearch.perform({ + searches: searches + }, commonParams)); + case 4: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function request() { + return _request.apply(this, arguments); + } + return request; + }() + }], [{ + key: "INDEX_NAME_MATCHING_REGEX", + get: function get() { + return new RegExp("^(.+?)(?=(/sort/(.*))|$)"); + } + }, { + key: "DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX", + get: function get() { + return new RegExp("(.*)((?!:).):(?!:)(.*)"); + } + }, { + key: "DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX", + get: function get() { + return new RegExp("(.*?)(<=|>=|>|<|=)(.*)"); + } + }]); +}(); /***/ }), -/***/ "./node_modules/axios/lib/cancel/isCancel.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/cancel/isCancel.js ***! - \***************************************************/ -/***/ ((module) => { +/***/ "./src/SearchResponseAdapter.js": +/*!**************************************!*\ + !*** ./src/SearchResponseAdapter.js ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SearchResponseAdapter: () => (/* binding */ SearchResponseAdapter) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); +/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); +/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _support_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./support/utils */ "./src/support/utils.js"); -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; - -/***/ }), -/***/ "./node_modules/axios/lib/core/Axios.js": -/*!**********************************************!*\ - !*** ./node_modules/axios/lib/core/Axios.js ***! - \**********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { -"use strict"; -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); -var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js"); -var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js"); -var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js"); -var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js"); -var validator = __webpack_require__(/*! ../helpers/validator */ "./node_modules/axios/lib/helpers/validator.js"); -var validators = validator.validators; -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ -function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; -} +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -/** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ -Axios.prototype.request = function request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; +var SearchResponseAdapter = /*#__PURE__*/function () { + function SearchResponseAdapter(typesenseResponse, instantsearchRequest, configuration) { + var allTypesenseResults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + var fullTypesenseResponse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__["default"])(this, SearchResponseAdapter); + this.typesenseResponse = typesenseResponse; + this.instantsearchRequest = instantsearchRequest; + this.configuration = configuration; + this.allTypesenseResults = allTypesenseResults; + this.fullTypesenseResponse = fullTypesenseResponse; } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__["default"])(SearchResponseAdapter, [{ + key: "_adaptGroupedHits", + value: function _adaptGroupedHits(typesenseGroupedHits) { + var _this = this; + var adaptedResult = []; + adaptedResult = typesenseGroupedHits.map(function (groupedHit) { + var adaptedHits = _this._adaptHits(groupedHit.hits); + adaptedHits.forEach(function (hit) { + hit["group_key"] = hit["_group_key"] = groupedHit.group_key; + if (groupedHit.found) { + hit["_group_found"] = groupedHit.found; + } + }); + return adaptedHits; + }); - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } + // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...] + // where each element in the outermost array corresponds to a group. - var transitional = config.transitional; + if (this.configuration.flattenGroupedHits) { + // We flatten it to [{}, {}, {}] + adaptedResult = adaptedResult.flat(); + } else { + // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}] + // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits + adaptedResult = adaptedResult.map(function (adaptedGroupedHit) { + return _objectSpread(_objectSpread({}, adaptedGroupedHit[0]), {}, { + _grouped_hits: adaptedGroupedHit + }); + }); + } + return adaptedResult; + } + }, { + key: "_adaptHits", + value: function _adaptHits(typesenseHits) { + var _this2 = this; + var adaptedResult = []; + adaptedResult = typesenseHits.map(function (typesenseHit) { + var adaptedHit = _objectSpread({}, typesenseHit.document); + adaptedHit.objectID = typesenseHit.document.id; + adaptedHit._snippetResult = _this2._adaptHighlightResult(typesenseHit, "snippet"); + adaptedHit._highlightResult = _this2._adaptHighlightResult(typesenseHit, "value"); + adaptedHit._rawTypesenseHit = typesenseHit; - if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } + // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits + if (_this2.fullTypesenseResponse.conversation) { + adaptedHit._rawTypesenseConversation = _this2.fullTypesenseResponse.conversation; + } - // filter out skipped interceptors - var requestInterceptorChain = []; - var synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; + // Add metadata fields to result, if a field with that name doesn't already exist + ["text_match", "geo_distance_meters", "curated", "text_match_info", "hybrid_search_info", "vector_distance"].forEach(function (metadataField) { + if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) { + adaptedHit[metadataField] = typesenseHit[metadataField]; + } + }); + var geoLocationValue = adaptedHit[_this2.configuration.geoLocationField]; + if (geoLocationValue) { + adaptedHit._geoloc = { + lat: geoLocationValue[0], + lng: geoLocationValue[1] + }; + } + return adaptedHit; + }); + return adaptedResult; } + }, { + key: "_adaptHighlightResult", + value: function _adaptHighlightResult(typesenseHit, snippetOrValue) { + var result = {}; - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - var responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - var promise; - - if (!synchronousRequestInterceptors) { - var chain = [dispatchRequest, undefined]; + // If there is a highlight object available (as of v0.24.0), + // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above + // use that instead of the highlights array, since it supports highlights of nested fields + if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) { + this.adaptHighlightObject(typesenseHit, result, snippetOrValue); + } else { + this.adaptHighlightsArray(typesenseHit, result, snippetOrValue); + } + return result; + } + }, { + key: "isHighlightPost0240RCN32Format", + value: function isHighlightPost0240RCN32Format(highlight) { + return highlight.full == null && highlight.snippet == null; + } + }, { + key: "adaptHighlightsArray", + value: function adaptHighlightsArray(typesenseHit, result, snippetOrValue) { + var _this3 = this; + // Algolia lists all searchable attributes in this key, even if there are no matches + // So do the same and then override highlights - Array.prototype.unshift.apply(chain, requestInterceptorChain); - chain = chain.concat(responseInterceptorChain); + Object.assign.apply(Object, [result].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(Object.entries(typesenseHit.document).map(function (_ref) { + var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2), + attribute = _ref2[0], + value = _ref2[1]; + return (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, attribute, { + value: value, + matchLevel: "none", + matchedWords: [] + }); + })))); + typesenseHit.highlights.forEach(function (highlight) { + result[highlight.field] = { + value: highlight[snippetOrValue] || highlight["".concat(snippetOrValue, "s")], + matchLevel: "full", + matchedWords: highlight.matched_tokens + }; + if (highlight.indices) { + result[highlight.field]["matchedIndices"] = highlight.indices; + } + }); - promise = Promise.resolve(config); - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); + // Now convert any values that have an array value + // Also, replace highlight tag + Object.entries(result).forEach(function (_ref4) { + var _ref5 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref4, 2), + k = _ref5[0], + v = _ref5[1]; + var attribute = k; + var value = v.value, + matchLevel = v.matchLevel, + matchedWords = v.matchedWords, + matchedIndices = v.matchedIndices; + if (value == null) { + result[attribute] = _this3._adaptHighlightNullValue(); + } else if (Array.isArray(value)) { + // Algolia lists all values of the key in highlights, even those that don't have any highlights + // So add all values of the array field, including highlights + result[attribute] = []; + typesenseHit.document[attribute].forEach(function (unhighlightedValueFromArray, index) { + if (matchedIndices && matchedIndices.includes(index)) { + result[attribute].push({ + value: _this3._adaptHighlightTag("".concat(value[matchedIndices.indexOf(index)]), _this3.instantsearchRequest.params.highlightPreTag, _this3.instantsearchRequest.params.highlightPostTag), + matchLevel: matchLevel, + matchedWords: matchedWords[index] + }); + } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(unhighlightedValueFromArray) === "object") { + // Handle arrays of objects + // Side note: Typesense does not support highlights for nested objects in this `highlights` array, + // so we pass in an empty object below + result[attribute].push(_this3._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue)); + } else { + result[attribute].push({ + value: "".concat(unhighlightedValueFromArray), + matchLevel: "none", + matchedWords: [] + }); + } + }); + } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(value) === "object") { + // Handle nested objects + // Side note: Typesense does not support highlights for nested objects in this `highlights` array, + // so we pass in an empty object below + result[attribute] = _this3._adaptHighlightInObjectValue(value, {}, snippetOrValue); + } else { + // Convert all values to strings + result[attribute].value = _this3._adaptHighlightTag("".concat(value), _this3.instantsearchRequest.params.highlightPreTag, _this3.instantsearchRequest.params.highlightPostTag); + } + }); + } + }, { + key: "adaptHighlightObject", + value: function adaptHighlightObject(typesenseHit, result, snippetOrValue) { + Object.assign(result, this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue)); + } + }, { + key: "_adaptHighlightInObjectValue", + value: function _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) { + var _this4 = this; + return Object.assign.apply(Object, [{}].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(Object.entries(objectValue).map(function (_ref6) { + var _ref7 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref6, 2), + attribute = _ref7[0], + value = _ref7[1]; + var adaptedValue; + if (value == null) { + adaptedValue = _this4._adaptHighlightNullValue(); + } else if (Array.isArray(value)) { + var _highlightObjectValue; + adaptedValue = _this4._adaptHighlightInArrayValue(value, (_highlightObjectValue = highlightObjectValue === null || highlightObjectValue === void 0 ? void 0 : highlightObjectValue[attribute]) !== null && _highlightObjectValue !== void 0 ? _highlightObjectValue : [], snippetOrValue); + } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(value) === "object") { + var _highlightObjectValue2; + adaptedValue = _this4._adaptHighlightInObjectValue(value, (_highlightObjectValue2 = highlightObjectValue === null || highlightObjectValue === void 0 ? void 0 : highlightObjectValue[attribute]) !== null && _highlightObjectValue2 !== void 0 ? _highlightObjectValue2 : {}, snippetOrValue); + } else { + adaptedValue = _this4._adaptHighlightInPrimitiveValue(value, highlightObjectValue === null || highlightObjectValue === void 0 ? void 0 : highlightObjectValue[attribute], snippetOrValue); + } + return (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, attribute, adaptedValue); + })))); + } + }, { + key: "_adaptHighlightInArrayValue", + value: function _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) { + var _this5 = this; + return arrayValue.map(function (value, index) { + var adaptedValue; + if (value == null) { + adaptedValue = _this5._adaptHighlightNullValue(); + } else if (Array.isArray(value)) { + var _highlightArrayValue$; + adaptedValue = _this5._adaptHighlightInArrayValue(value, (_highlightArrayValue$ = highlightArrayValue === null || highlightArrayValue === void 0 ? void 0 : highlightArrayValue[index]) !== null && _highlightArrayValue$ !== void 0 ? _highlightArrayValue$ : [], snippetOrValue); + } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(value) === "object") { + var _highlightArrayValue$2; + adaptedValue = _this5._adaptHighlightInObjectValue(value, (_highlightArrayValue$2 = highlightArrayValue === null || highlightArrayValue === void 0 ? void 0 : highlightArrayValue[index]) !== null && _highlightArrayValue$2 !== void 0 ? _highlightArrayValue$2 : {}, snippetOrValue); + } else { + adaptedValue = _this5._adaptHighlightInPrimitiveValue(value, highlightArrayValue === null || highlightArrayValue === void 0 ? void 0 : highlightArrayValue[index], snippetOrValue); + } + return adaptedValue; + }); + } + }, { + key: "_adaptHighlightInPrimitiveValue", + value: function _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) { + if (highlightPrimitiveValue != null) { + var _ref9, _highlightPrimitiveVa; + return { + value: this._adaptHighlightTag("".concat((_ref9 = (_highlightPrimitiveVa = highlightPrimitiveValue[snippetOrValue]) !== null && _highlightPrimitiveVa !== void 0 ? _highlightPrimitiveVa : highlightPrimitiveValue["highlight"]) !== null && _ref9 !== void 0 ? _ref9 : highlightPrimitiveValue["snippet"]), this.instantsearchRequest.params.highlightPreTag, this.instantsearchRequest.params.highlightPostTag), + matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? "full" : "none", + matchedWords: highlightPrimitiveValue.matched_tokens || [] + }; + } else { + return { + // Convert all values to strings + value: this._adaptHighlightTag("".concat(primitiveValue), this.instantsearchRequest.params.highlightPreTag, this.instantsearchRequest.params.highlightPostTag), + matchLevel: "none", + matchedWords: [] + }; + } } + }, { + key: "_adaptHighlightNullValue", + value: function _adaptHighlightNullValue() { + return { + value: "", + matchLevel: "none", + matchedWords: [] + }; + } + }, { + key: "_adaptFacets", + value: function _adaptFacets(typesenseFacetCounts) { + var adaptedResult = {}; + typesenseFacetCounts.forEach(function (facet) { + Object.assign(adaptedResult, (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, facet.field_name, Object.assign.apply(Object, [{}].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(facet.counts.map(function (count) { + return (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, count.value, count.count); + })))))); + }); + return adaptedResult; + } + }, { + key: "_adaptFacetStats", + value: function _adaptFacetStats(typesenseFacetCounts) { + var adaptedResult = {}; + typesenseFacetCounts.forEach(function (facet) { + if (Object.keys(facet.stats).length > 0) { + Object.assign(adaptedResult, (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, facet.field_name, facet.stats)); + } + }); + return adaptedResult; + } + }, { + key: "_adaptRenderingContent", + value: function _adaptRenderingContent(typesenseFacetCounts) { + var _adaptedResult$facetO; + var adaptedResult = Object.assign({}, this.configuration.renderingContent); - return promise; - } + // Only set facet ordering if the user has not set one + if (((_adaptedResult$facetO = adaptedResult.facetOrdering) === null || _adaptedResult$facetO === void 0 || (_adaptedResult$facetO = _adaptedResult$facetO.facets) === null || _adaptedResult$facetO === void 0 ? void 0 : _adaptedResult$facetO.order) == null) { + adaptedResult.facetOrdering = adaptedResult.facetOrdering || {}; + adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {}; + adaptedResult.facetOrdering.facets.order = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(new Set(typesenseFacetCounts.map(function (fc) { + return fc["field_name"]; + }).concat(this.allTypesenseResults.map(function (r) { + return r.facet_counts || []; + }).flat().map(function (fc) { + return fc["field_name"]; + }).filter(function (f) { + return f; + })))); + } + return adaptedResult; + } + }, { + key: "adapt", + value: function adapt() { + var adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []); + var adaptedResult = _objectSpread({ + hits: this.typesenseResponse.grouped_hits ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits) : this._adaptHits(this.typesenseResponse.hits), + nbHits: this.typesenseResponse.found, + page: this.typesenseResponse.page - 1, + nbPages: this._adaptNumberOfPages(), + hitsPerPage: this.typesenseResponse.request_params.per_page, + facets: this._adaptFacets(this.typesenseResponse.facet_counts || []), + facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}), + query: this.typesenseResponse.request_params.q, + processingTimeMS: this.typesenseResponse.search_time_ms + }, Object.keys(adaptedRenderingContent).length > 0 ? { + renderingContent: adaptedRenderingContent + } : null); + // If no results were found for the search, but there is still a conversation response, + // still send that as a hit so the conversation is accessible via Instantsearch + if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) { + adaptedResult.hits = [{ + _rawTypesenseConversation: this.fullTypesenseResponse.conversation + }]; + } - var newConfig = config; - while (requestInterceptorChain.length) { - var onFulfilled = requestInterceptorChain.shift(); - var onRejected = requestInterceptorChain.shift(); - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected(error); - break; + // console.log(adaptedResult); + return adaptedResult; } - } + }]); +}(); +Object.assign(SearchResponseAdapter.prototype, _support_utils__WEBPACK_IMPORTED_MODULE_6__.utils); - try { - promise = dispatchRequest(newConfig); - } catch (error) { - return Promise.reject(error); - } +/***/ }), - while (responseInterceptorChain.length) { - promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); - } +/***/ "./src/support/utils.js": +/*!******************************!*\ + !*** ./src/support/utils.js ***! + \******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - return promise; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ utils: () => (/* binding */ utils) +/* harmony export */ }); +var utils = { + _adaptHighlightTag: function _adaptHighlightTag(value, highlightPreTag, highlightPostTag) { + return value.replace(new RegExp("", "g"), highlightPreTag || "").replace(new RegExp("", "g"), highlightPostTag || ""); + }, + _adaptNumberOfPages: function _adaptNumberOfPages() { + var result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page; + if (Number.isFinite(result)) { + return Math.ceil(result); + } else { + return 1; + } + } }; -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); -}; +/***/ }), -// Provide aliases for supported request methods -utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; -}); +/***/ "./node_modules/loglevel/lib/loglevel.js": +/*!***********************************************!*\ + !*** ./node_modules/loglevel/lib/loglevel.js ***! + \***********************************************/ +/***/ (function(module, exports, __webpack_require__) { -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: data - })); - }; -}); +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* +* loglevel - https://github.com/pimterry/loglevel +* +* Copyright (c) 2013 Tim Perry +* Licensed under the MIT license. +*/ +(function (root, definition) { + "use strict"; + if (true) { + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(this, function () { + "use strict"; -module.exports = Axios; + // Slightly dubious tricks to cut down minimized file size + var noop = function() {}; + var undefinedType = "undefined"; + var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && ( + /Trident\/|MSIE /.test(window.navigator.userAgent) + ); + var logMethods = [ + "trace", + "debug", + "info", + "warn", + "error" + ]; -/***/ }), + // Cross-browser bind equivalent that works at least back to IE6 + function bindMethod(obj, methodName) { + var method = obj[methodName]; + if (typeof method.bind === 'function') { + return method.bind(obj); + } else { + try { + return Function.prototype.bind.call(method, obj); + } catch (e) { + // Missing bind shim or IE8 + Modernizr, fallback to wrapping + return function() { + return Function.prototype.apply.apply(method, [obj, arguments]); + }; + } + } + } -/***/ "./node_modules/axios/lib/core/InterceptorManager.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! - \***********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + // Trace() doesn't print the message in IE, so for that case we need to wrap it + function traceForIE() { + if (console.log) { + if (console.log.apply) { + console.log.apply(console, arguments); + } else { + // In old IE, native console methods themselves don't have apply(). + Function.prototype.apply.apply(console.log, [console, arguments]); + } + } + if (console.trace) console.trace(); + } -"use strict"; + // Build the best logging method possible for this env + // Wherever possible we want to bind, not wrap, to preserve stack traces + function realMethod(methodName) { + if (methodName === 'debug') { + methodName = 'log'; + } + if (typeof console === undefinedType) { + return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives + } else if (methodName === 'trace' && isIE) { + return traceForIE; + } else if (console[methodName] !== undefined) { + return bindMethod(console, methodName); + } else if (console.log !== undefined) { + return bindMethod(console, 'log'); + } else { + return noop; + } + } -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); + // These private functions always need `this` to be set properly -function InterceptorManager() { - this.handlers = []; -} + function replaceLoggingMethods(level, loggerName) { + /*jshint validthis:true */ + for (var i = 0; i < logMethods.length; i++) { + var methodName = logMethods[i]; + this[methodName] = (i < level) ? + noop : + this.methodFactory(methodName, level, loggerName); + } -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; -}; + // Define log.log as an alias for log.debug + this.log = this.debug; + } -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; + // In old IE versions, the console isn't present until you first open it. + // We build realMethod() replacements here that regenerate logging methods + function enableLoggingWhenConsoleArrives(methodName, level, loggerName) { + return function () { + if (typeof console !== undefinedType) { + replaceLoggingMethods.call(this, level, loggerName); + this[methodName].apply(this, arguments); + } + }; + } -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); + // By default, we use closely bound real methods wherever possible, and + // otherwise we wait for a console to appear, and then try again. + function defaultMethodFactory(methodName, level, loggerName) { + /*jshint validthis:true */ + return realMethod(methodName) || + enableLoggingWhenConsoleArrives.apply(this, arguments); } - }); -}; -module.exports = InterceptorManager; + function Logger(name, defaultLevel, factory) { + var self = this; + var currentLevel; + defaultLevel = defaultLevel == null ? "WARN" : defaultLevel; + var storageKey = "loglevel"; + if (typeof name === "string") { + storageKey += ":" + name; + } else if (typeof name === "symbol") { + storageKey = undefined; + } -/***/ }), + function persistLevelIfPossible(levelNum) { + var levelName = (logMethods[levelNum] || 'silent').toUpperCase(); -/***/ "./node_modules/axios/lib/core/buildFullPath.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/buildFullPath.js ***! - \******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + if (typeof window === undefinedType || !storageKey) return; -"use strict"; + // Use localStorage if available + try { + window.localStorage[storageKey] = levelName; + return; + } catch (ignore) {} + // Use session cookie as fallback + try { + window.document.cookie = + encodeURIComponent(storageKey) + "=" + levelName + ";"; + } catch (ignore) {} + } -var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); -var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./node_modules/axios/lib/helpers/combineURLs.js"); + function getPersistedLevel() { + var storedLevel; -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ -module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -}; + if (typeof window === undefinedType || !storageKey) return; + try { + storedLevel = window.localStorage[storageKey]; + } catch (ignore) {} -/***/ }), + // Fallback to cookies if local storage gives us nothing + if (typeof storedLevel === undefinedType) { + try { + var cookie = window.document.cookie; + var location = cookie.indexOf( + encodeURIComponent(storageKey) + "="); + if (location !== -1) { + storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1]; + } + } catch (ignore) {} + } -/***/ "./node_modules/axios/lib/core/createError.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/createError.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + // If the stored level is not valid, treat it as if nothing was stored. + if (self.levels[storedLevel] === undefined) { + storedLevel = undefined; + } -"use strict"; + return storedLevel; + } + function clearPersistedLevel() { + if (typeof window === undefinedType || !storageKey) return; -var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/axios/lib/core/enhanceError.js"); + // Use localStorage if available + try { + window.localStorage.removeItem(storageKey); + return; + } catch (ignore) {} -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; + // Use session cookie as fallback + try { + window.document.cookie = + encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; + } catch (ignore) {} + } + /* + * + * Public logger API - see https://github.com/pimterry/loglevel for details + * + */ -/***/ }), - -/***/ "./node_modules/axios/lib/core/dispatchRequest.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! - \********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); -var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/axios/lib/core/transformData.js"); -var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js"); -var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults/index.js"); -var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new Cancel('canceled'); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); + self.name = name; - // Ensure headers exist - config.headers = config.headers || {}; + self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, + "ERROR": 4, "SILENT": 5}; - // Transform request data - config.data = transformData.call( - config, - config.data, - config.headers, - config.transformRequest - ); + self.methodFactory = factory || defaultMethodFactory; - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); + self.getLevel = function () { + return currentLevel; + }; - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); + self.setLevel = function (level, persist) { + if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) { + level = self.levels[level.toUpperCase()]; + } + if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) { + currentLevel = level; + if (persist !== false) { // defaults to true + persistLevelIfPossible(level); + } + replaceLoggingMethods.call(self, level, name); + if (typeof console === undefinedType && level < self.levels.SILENT) { + return "No console available for logging"; + } + } else { + throw "log.setLevel() called with invalid level: " + level; + } + }; - var adapter = config.adapter || defaults.adapter; + self.setDefaultLevel = function (level) { + defaultLevel = level; + if (!getPersistedLevel()) { + self.setLevel(level, false); + } + }; - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); + self.resetLevel = function () { + self.setLevel(defaultLevel, false); + clearPersistedLevel(); + }; - // Transform response data - response.data = transformData.call( - config, - response.data, - response.headers, - config.transformResponse - ); + self.enableAll = function(persist) { + self.setLevel(self.levels.TRACE, persist); + }; - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); + self.disableAll = function(persist) { + self.setLevel(self.levels.SILENT, persist); + }; - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - reason.response.data, - reason.response.headers, - config.transformResponse - ); + // Initialize with the right level + var initialLevel = getPersistedLevel(); + if (initialLevel == null) { + initialLevel = defaultLevel; } + self.setLevel(initialLevel, false); } - return Promise.reject(reason); - }); -}; + /* + * + * Top-level API + * + */ + var defaultLogger = new Logger(); -/***/ }), + var _loggersByName = {}; + defaultLogger.getLogger = function getLogger(name) { + if ((typeof name !== "symbol" && typeof name !== "string") || name === "") { + throw new TypeError("You must supply a name when creating a logger."); + } -/***/ "./node_modules/axios/lib/core/enhanceError.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/core/enhanceError.js ***! - \*****************************************************/ -/***/ ((module) => { + var logger = _loggersByName[name]; + if (!logger) { + logger = _loggersByName[name] = new Logger( + name, defaultLogger.getLevel(), defaultLogger.methodFactory); + } + return logger; + }; -"use strict"; + // Grab the current global log variable in case of overwrite + var _log = (typeof window !== undefinedType) ? window.log : undefined; + defaultLogger.noConflict = function() { + if (typeof window !== undefinedType && + window.log === defaultLogger) { + window.log = _log; + } + return defaultLogger; + }; -/** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ -module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } + defaultLogger.getLoggers = function getLoggers() { + return _loggersByName; + }; - error.request = request; - error.response = response; - error.isAxiosError = true; + // ES6 default export, for compatibility + defaultLogger['default'] = defaultLogger; - error.toJSON = function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code, - status: this.response && this.response.status ? this.response.status : null - }; - }; - return error; -}; + return defaultLogger; +})); /***/ }), -/***/ "./node_modules/axios/lib/core/mergeConfig.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/mergeConfig.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense.js": +/*!*************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense.js ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; - -var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js"); - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - return getMergedValue(undefined, config1[prop]); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(undefined, config2[prop]); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - return getMergedValue(undefined, config1[prop]); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(prop) { - if (prop in config2) { - return getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - return getMergedValue(undefined, config1[prop]); +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - } - - var mergeMap = { - 'url': valueFromConfig2, - 'method': valueFromConfig2, - 'data': valueFromConfig2, - 'baseURL': defaultToConfig2, - 'transformRequest': defaultToConfig2, - 'transformResponse': defaultToConfig2, - 'paramsSerializer': defaultToConfig2, - 'timeout': defaultToConfig2, - 'timeoutMessage': defaultToConfig2, - 'withCredentials': defaultToConfig2, - 'adapter': defaultToConfig2, - 'responseType': defaultToConfig2, - 'xsrfCookieName': defaultToConfig2, - 'xsrfHeaderName': defaultToConfig2, - 'onUploadProgress': defaultToConfig2, - 'onDownloadProgress': defaultToConfig2, - 'decompress': defaultToConfig2, - 'maxContentLength': defaultToConfig2, - 'maxBodyLength': defaultToConfig2, - 'transport': defaultToConfig2, - 'httpAgent': defaultToConfig2, - 'httpsAgent': defaultToConfig2, - 'cancelToken': defaultToConfig2, - 'socketPath': defaultToConfig2, - 'responseEncoding': defaultToConfig2, - 'validateStatus': mergeDirectKeys - }; - - utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { - var merge = mergeMap[prop] || mergeDeepProperties; - var configValue = merge(prop); - (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; }; - +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Errors = exports.SearchClient = exports.Client = void 0; +var Client_1 = __importDefault(__webpack_require__(/*! ./Typesense/Client */ "./node_modules/typesense/lib/Typesense/Client.js")); +exports.Client = Client_1.default; +var SearchClient_1 = __importDefault(__webpack_require__(/*! ./Typesense/SearchClient */ "./node_modules/typesense/lib/Typesense/SearchClient.js")); +exports.SearchClient = SearchClient_1.default; +var Errors = __importStar(__webpack_require__(/*! ./Typesense/Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js")); +exports.Errors = Errors; +exports["default"] = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors }; +//# sourceMappingURL=Typesense.js.map /***/ }), -/***/ "./node_modules/axios/lib/core/settle.js": -/*!***********************************************!*\ - !*** ./node_modules/axios/lib/core/settle.js ***! - \***********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Alias.js": +/*!*******************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Alias.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; - -var createError = __webpack_require__(/*! ./createError */ "./node_modules/axios/lib/core/createError.js"); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Aliases_1 = __importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); +var Alias = /** @class */ (function () { + function Alias(name, apiCall) { + this.name = name; + this.apiCall = apiCall; + } + Alias.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Alias.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + Alias.prototype.endpointPath = function () { + return "".concat(Aliases_1.default.RESOURCEPATH, "/").concat(this.name); + }; + return Alias; +}()); +exports["default"] = Alias; +//# sourceMappingURL=Alias.js.map /***/ }), -/***/ "./node_modules/axios/lib/core/transformData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/transformData.js ***! - \******************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Aliases.js": +/*!*********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Aliases.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { "use strict"; - -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); -var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults/index.js"); - -/** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ -module.exports = function transformData(data, headers, fns) { - var context = this || defaults; - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn.call(context, data, headers); - }); - - return data; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/aliases"; +var Aliases = /** @class */ (function () { + function Aliases(apiCall) { + this.apiCall = apiCall; + } + Aliases.prototype.upsert = function (name, mapping) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)]; + }); + }); + }; + Aliases.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); + }); + }; + Aliases.prototype.endpointPath = function (aliasName) { + return "".concat(Aliases.RESOURCEPATH, "/").concat(aliasName); + }; + Object.defineProperty(Aliases, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Aliases; +}()); +exports["default"] = Aliases; +//# sourceMappingURL=Aliases.js.map /***/ }), -/***/ "./node_modules/axios/lib/defaults/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/defaults/index.js ***! - \**************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Analytics.js": +/*!***********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Analytics.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; - -var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js"); -var normalizeHeaderName = __webpack_require__(/*! ../helpers/normalizeHeaderName */ "./node_modules/axios/lib/helpers/normalizeHeaderName.js"); -var enhanceError = __webpack_require__(/*! ../core/enhanceError */ "./node_modules/axios/lib/core/enhanceError.js"); -var transitionalDefaults = __webpack_require__(/*! ./transitional */ "./node_modules/axios/lib/defaults/transitional.js"); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__(/*! ../adapters/xhr */ "./node_modules/axios/lib/adapters/xhr.js"); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = __webpack_require__(/*! ../adapters/http */ "./node_modules/axios/lib/adapters/xhr.js"); - } - return adapter; -} - -function stringifySafely(rawValue, parser, encoder) { - if (utils.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils.trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +var AnalyticsRules_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); +var AnalyticsRule_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRule */ "./node_modules/typesense/lib/Typesense/AnalyticsRule.js")); +var RESOURCEPATH = "/analytics"; +var Analytics = /** @class */ (function () { + function Analytics(apiCall) { + this.apiCall = apiCall; + this.individualAnalyticsRules = {}; + this.apiCall = apiCall; + this._analyticsRules = new AnalyticsRules_1.default(this.apiCall); } - } - - return (encoder || JSON.stringify)(rawValue); -} - -var defaults = { - - transitional: transitionalDefaults, + Analytics.prototype.rules = function (id) { + if (id === undefined) { + return this._analyticsRules; + } + else { + if (this.individualAnalyticsRules[id] === undefined) { + this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall); + } + return this.individualAnalyticsRules[id]; + } + }; + Object.defineProperty(Analytics, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Analytics; +}()); +exports["default"] = Analytics; +//# sourceMappingURL=Analytics.js.map - adapter: getDefaultAdapter(), +/***/ }), - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) { - setContentTypeIfUnset(headers, 'application/json'); - return stringifySafely(data); - } - return data; - }], +/***/ "./node_modules/typesense/lib/Typesense/AnalyticsRule.js": +/*!***************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/AnalyticsRule.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - transformResponse: [function transformResponse(data) { - var transitional = this.transitional || defaults.transitional; - var silentJSONParsing = transitional && transitional.silentJSONParsing; - var forcedJSONParsing = transitional && transitional.forcedJSONParsing; - var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; +"use strict"; - if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) { - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw enhanceError(e, this, 'E_JSON_PARSE'); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*' - } - } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/transitional.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/defaults/transitional.js ***! - \*********************************************************/ -/***/ ((module) => { - -"use strict"; - - -module.exports = { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } }; - - -/***/ }), - -/***/ "./node_modules/axios/lib/env/data.js": -/*!********************************************!*\ - !*** ./node_modules/axios/lib/env/data.js ***! - \********************************************/ -/***/ ((module) => { - -module.exports = { - "version": "0.26.1" +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var AnalyticsRules_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); +var AnalyticsRule = /** @class */ (function () { + function AnalyticsRule(name, apiCall) { + this.name = name; + this.apiCall = apiCall; + } + AnalyticsRule.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + AnalyticsRule.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + AnalyticsRule.prototype.endpointPath = function () { + return "".concat(AnalyticsRules_1.default.RESOURCEPATH, "/").concat(this.name); + }; + return AnalyticsRule; +}()); +exports["default"] = AnalyticsRule; +//# sourceMappingURL=AnalyticsRule.js.map /***/ }), -/***/ "./node_modules/axios/lib/helpers/bind.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/bind.js ***! - \************************************************/ -/***/ ((module) => { +/***/ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js": +/*!****************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/AnalyticsRules.js ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports) { "use strict"; - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - return fn.apply(thisArg, args); - }; }; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/analytics/rules"; +var AnalyticsRules = /** @class */ (function () { + function AnalyticsRules(apiCall) { + this.apiCall = apiCall; + this.apiCall = apiCall; + } + AnalyticsRules.prototype.upsert = function (name, params) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)]; + }); + }); + }; + AnalyticsRules.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + AnalyticsRules.prototype.endpointPath = function (operation) { + return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + }; + Object.defineProperty(AnalyticsRules, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return AnalyticsRules; +}()); +exports["default"] = AnalyticsRules; +//# sourceMappingURL=AnalyticsRules.js.map /***/ }), -/***/ "./node_modules/axios/lib/helpers/buildURL.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/buildURL.js ***! - \****************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/ApiCall.js": +/*!*********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/ApiCall.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; - -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); - -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -}; - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/combineURLs.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! - \*******************************************************/ -/***/ ((module) => { - -"use strict"; - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/cookies.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/helpers/cookies.js ***! - \***************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*********************************************************/ -/***/ ((module) => { - -"use strict"; - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -}; - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! - \********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -module.exports = function isAxiosError(payload) { - return utils.isObject(payload) && (payload.isAxiosError === true); -}; - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js": -/*!***************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***! - \***************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js"); - -module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); }; - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! - \********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - }); - - return parsed; }; - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/spread.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/helpers/spread.js ***! - \**************************************************/ -/***/ ((module) => { - -"use strict"; - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/validator.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/validator.js ***! - \*****************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var VERSION = (__webpack_require__(/*! ../env/data */ "./node_modules/axios/lib/env/data.js").version); - -var validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -var deprecatedWarnings = {}; - -/** - * Transitional option validator - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return function(value, opt, opts) { - if (validator === false) { - throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : ''))); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new TypeError('options must be an object'); - } - var keys = Object.keys(options); - var i = keys.length; - while (i-- > 0) { - var opt = keys[i]; - var validator = schema[opt]; - if (validator) { - var value = options[opt]; - var result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new TypeError('option ' + opt + ' must be ' + result); - } - continue; - } - if (allowUnknown !== true) { - throw Error('Unknown option ' + opt); - } - } -} - -module.exports = { - assertOptions: assertOptions, - validators: validators -}; - - -/***/ }), - -/***/ "./node_modules/axios/lib/utils.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/utils.js ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js"); - -// utils is a library of generic helper functions non-specific to axios - -var toString = Object.prototype.toString; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return Array.isArray(val); -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return toString.call(val) === '[object FormData]'; -} - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ -function isPlainObject(val) { - if (toString.call(val) !== '[object Object]') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} - -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} - -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return toString.call(val) === '[object URLSearchParams]'; -} - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var axios_1 = __importDefault(__webpack_require__(/*! axios */ "./node_modules/axios/dist/browser/axios.cjs")); +var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./Errors/TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; +var HEALTHY = true; +var UNHEALTHY = false; +var ApiCall = /** @class */ (function () { + function ApiCall(configuration) { + this.configuration = configuration; + this.apiKey = this.configuration.apiKey; + this.nodes = + this.configuration.nodes == null + ? this.configuration.nodes + : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes + this.nearestNode = + this.configuration.nearestNode == null + ? this.configuration.nearestNode + : JSON.parse(JSON.stringify(this.configuration.nearestNode)); + this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds; + this.healthcheckIntervalSeconds = + this.configuration.healthcheckIntervalSeconds; + this.numRetriesPerRequest = this.configuration.numRetries; + this.retryIntervalSeconds = this.configuration.retryIntervalSeconds; + this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam; + this.additionalUserHeaders = this.configuration.additionalHeaders; + this.logger = this.configuration.logger; + this.initializeMetadataForNodes(); + this.currentNodeIndex = -1; } - } + ApiCall.prototype.get = function (endpoint, queryParameters, _a) { + if (queryParameters === void 0) { queryParameters = {}; } + var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d; + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_e) { + return [2 /*return*/, this.performRequest("get", endpoint, { + queryParameters: queryParameters, + abortSignal: abortSignal, + responseType: responseType, + })]; + }); + }); + }; + ApiCall.prototype.delete = function (endpoint, queryParameters) { + if (queryParameters === void 0) { queryParameters = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.performRequest("delete", endpoint, { queryParameters: queryParameters })]; + }); + }); + }; + ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) { + if (bodyParameters === void 0) { bodyParameters = {}; } + if (queryParameters === void 0) { queryParameters = {}; } + if (additionalHeaders === void 0) { additionalHeaders = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.performRequest("post", endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters, + additionalHeaders: additionalHeaders, + })]; + }); + }); + }; + ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) { + if (bodyParameters === void 0) { bodyParameters = {}; } + if (queryParameters === void 0) { queryParameters = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.performRequest("put", endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters, + })]; + }); + }); + }; + ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) { + if (bodyParameters === void 0) { bodyParameters = {}; } + if (queryParameters === void 0) { queryParameters = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.performRequest("patch", endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters, + })]; + }); + }); + }; + ApiCall.prototype.performRequest = function (requestType, endpoint, _a) { + var _b, _c, _d; + var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k; + return __awaiter(this, void 0, void 0, function () { + var requestNumber, lastException, _loop_1, this_1, numTries, state_1; + return __generator(this, function (_l) { + switch (_l.label) { + case 0: + this.configuration.validate(); + requestNumber = Date.now(); + this.logger.debug("Request #".concat(requestNumber, ": Performing ").concat(requestType.toUpperCase(), " request: ").concat(endpoint)); + _loop_1 = function (numTries) { + var node, abortListener, requestOptions, cancelToken, source_1, response, error_1; + return __generator(this, function (_m) { + switch (_m.label) { + case 0: + node = this_1.getNextNode(requestNumber); + this_1.logger.debug("Request #".concat(requestNumber, ": Attempting ").concat(requestType.toUpperCase(), " request Try #").concat(numTries, " to Node ").concat(node.index)); + if (abortSignal && abortSignal.aborted) { + return [2 /*return*/, { value: Promise.reject(new Error("Request aborted by caller.")) }]; + } + abortListener = void 0; + _m.label = 1; + case 1: + _m.trys.push([1, 3, 5, 6]); + requestOptions = { + method: requestType, + url: this_1.uriFor(endpoint, node), + headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders), + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: responseType, + validateStatus: function (status) { + /* Override default validateStatus, which only considers 2xx a success. + In our case, if the server returns any HTTP code, we will handle it below. + We do this to be able to raise custom errors based on response code. + */ + return status > 0; + }, + transformResponse: [ + function (data, headers) { + var transformedData = data; + if (headers !== undefined && + typeof data === "string" && + headers["content-type"] && + headers["content-type"].startsWith("application/json")) { + transformedData = JSON.parse(data); + } + return transformedData; + }, + ], + }; + if (skipConnectionTimeout !== true) { + requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000; + } + if (queryParameters && Object.keys(queryParameters).length !== 0) { + requestOptions.params = queryParameters; + } + if (this_1.sendApiKeyAsQueryParam) { + requestOptions.params = requestOptions.params || {}; + requestOptions.params["x-typesense-api-key"] = this_1.apiKey; + } + if (this_1.configuration.httpAgent) { + this_1.logger.debug("Request #".concat(requestNumber, ": Using custom httpAgent")); + requestOptions.httpAgent = this_1.configuration.httpAgent; + } + if (this_1.configuration.httpsAgent) { + this_1.logger.debug("Request #".concat(requestNumber, ": Using custom httpsAgent")); + requestOptions.httpsAgent = this_1.configuration.httpsAgent; + } + if (bodyParameters && + ((typeof bodyParameters === "string" && + bodyParameters.length !== 0) || + (typeof bodyParameters === "object" && + Object.keys(bodyParameters).length !== 0))) { + requestOptions.data = bodyParameters; + } + // Translate from user-provided AbortController to the Axios request cancel mechanism. + if (abortSignal) { + cancelToken = axios_1.default.CancelToken; + source_1 = cancelToken.source(); + abortListener = function () { return source_1.cancel(); }; + abortSignal.addEventListener("abort", abortListener); + requestOptions.cancelToken = source_1.token; + } + return [4 /*yield*/, (0, axios_1.default)(requestOptions)]; + case 2: + response = _m.sent(); + if (response.status >= 1 && response.status <= 499) { + // Treat any status code > 0 and < 500 to be an indication that node is healthy + // We exclude 0 since some clients return 0 when request fails + this_1.setNodeHealthcheck(node, HEALTHY); + } + this_1.logger.debug("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " was made. Response Code was ").concat(response.status, ".")); + if (response.status >= 200 && response.status < 300) { + return [2 /*return*/, { value: Promise.resolve(response.data) }]; + } + else if (response.status < 500) { + return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }]; + } + else { + // Retry all other HTTP errors (HTTPStatus > 500) + // This will get caught by the catch block below + throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message); + } + return [3 /*break*/, 6]; + case 3: + error_1 = _m.sent(); + // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts + this_1.setNodeHealthcheck(node, UNHEALTHY); + lastException = error_1; + this_1.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(error_1.code, " ").concat(error_1.message).concat(error_1.response == null + ? "" + : " - " + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), "\"")); + // this.logger.debug(error.stack) + this_1.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(this_1.retryIntervalSeconds, "s and then retrying request...")); + return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)]; + case 4: + _m.sent(); + return [3 /*break*/, 6]; + case 5: + if (abortSignal && abortListener) { + abortSignal.removeEventListener("abort", abortListener); + } + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }; + this_1 = this; + numTries = 1; + _l.label = 1; + case 1: + if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4]; + return [5 /*yield**/, _loop_1(numTries)]; + case 2: + state_1 = _l.sent(); + if (typeof state_1 === "object") + return [2 /*return*/, state_1.value]; + _l.label = 3; + case 3: + numTries++; + return [3 /*break*/, 1]; + case 4: + this.logger.debug("Request #".concat(requestNumber, ": No retries left. Raising last error")); + return [2 /*return*/, Promise.reject(lastException)]; + } + }); + }); + }; + // Attempts to find the next healthy node, looping through the list of nodes once. + // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy + // so we can try the request for good measure, in case that node has become healthy since + ApiCall.prototype.getNextNode = function (requestNumber) { + if (requestNumber === void 0) { requestNumber = 0; } + // Check if nearestNode is set and is healthy, if so return it + if (this.nearestNode != null) { + this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? "Healthy" : "Unhealthy")); + if (this.nearestNode.isHealthy === true || + this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) { + this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(this.nearestNode.index)); + return this.nearestNode; + } + this.logger.debug("Request #".concat(requestNumber, ": Falling back to individual nodes")); + } + // Fallback to nodes as usual + this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: ").concat(this.nodes + .map(function (node) { + return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? "Healthy" : "Unhealthy"); + }) + .join(" || "))); + var candidateNode = this.nodes[0]; + for (var i = 0; i <= this.nodes.length; i++) { + this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; + candidateNode = this.nodes[this.currentNodeIndex]; + if (candidateNode.isHealthy === true || + this.nodeDueForHealthcheck(candidateNode, requestNumber)) { + this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(candidateNode.index)); + return candidateNode; + } + } + // None of the nodes are marked healthy, but some of them could have become healthy since last health check. + // So we will just return the next node. + this.logger.debug("Request #".concat(requestNumber, ": No healthy nodes were found. Returning the next node, Node ").concat(candidateNode.index)); + return candidateNode; + }; + ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) { + if (requestNumber === void 0) { requestNumber = 0; } + var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp > + this.healthcheckIntervalSeconds * 1000; + if (isDueForHealthcheck) { + this.logger.debug("Request #".concat(requestNumber, ": Node ").concat(node.index, " has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds, ". Adding it back into rotation.")); + } + return isDueForHealthcheck; + }; + ApiCall.prototype.initializeMetadataForNodes = function () { + var _this = this; + if (this.nearestNode != null) { + this.nearestNode.index = "nearestNode"; + this.setNodeHealthcheck(this.nearestNode, HEALTHY); + } + this.nodes.forEach(function (node, i) { + node.index = i; + _this.setNodeHealthcheck(node, HEALTHY); + }); + }; + ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) { + node.isHealthy = isHealthy; + node.lastAccessTimestamp = Date.now(); + }; + ApiCall.prototype.uriFor = function (endpoint, node) { + if (node.url != null) { + return "".concat(node.url).concat(endpoint); + } + return "".concat(node.protocol, "://").concat(node.host, ":").concat(node.port).concat(node.path).concat(endpoint); + }; + ApiCall.prototype.defaultHeaders = function () { + var defaultHeaders = {}; + if (!this.sendApiKeyAsQueryParam) { + defaultHeaders[APIKEYHEADERNAME] = this.apiKey; + } + defaultHeaders["Content-Type"] = "application/json"; + return defaultHeaders; + }; + ApiCall.prototype.timer = function (seconds) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })]; + }); + }); + }; + ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) { + var errorMessage = "Request failed with HTTP code ".concat(response.status); + if (typeof messageFromServer === "string" && + messageFromServer.trim() !== "") { + errorMessage += " | Server said: ".concat(messageFromServer); + } + var error = new TypesenseError_1.default(errorMessage); + if (response.status === 400) { + error = new Errors_1.RequestMalformed(errorMessage); + } + else if (response.status === 401) { + error = new Errors_1.RequestUnauthorized(errorMessage); + } + else if (response.status === 404) { + error = new Errors_1.ObjectNotFound(errorMessage); + } + else if (response.status === 409) { + error = new Errors_1.ObjectAlreadyExists(errorMessage); + } + else if (response.status === 422) { + error = new Errors_1.ObjectUnprocessable(errorMessage); + } + else if (response.status >= 500 && response.status <= 599) { + error = new Errors_1.ServerError(errorMessage); + } + else { + error = new Errors_1.HTTPError(errorMessage); + } + error.httpStatus = response.status; + return error; + }; + return ApiCall; +}()); +exports["default"] = ApiCall; +//# sourceMappingURL=ApiCall.js.map - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} +/***/ }), -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} +/***/ "./node_modules/typesense/lib/Typesense/Client.js": +/*!********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Client.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ -function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} +"use strict"; -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM +/* eslint-disable no-dupe-class-members */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Configuration_1 = __importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); +var ApiCall_1 = __importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Collection_1 = __importDefault(__webpack_require__(/*! ./Collection */ "./node_modules/typesense/lib/Typesense/Collection.js")); +var Aliases_1 = __importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); +var Alias_1 = __importDefault(__webpack_require__(/*! ./Alias */ "./node_modules/typesense/lib/Typesense/Alias.js")); +var Keys_1 = __importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); +var Key_1 = __importDefault(__webpack_require__(/*! ./Key */ "./node_modules/typesense/lib/Typesense/Key.js")); +var Debug_1 = __importDefault(__webpack_require__(/*! ./Debug */ "./node_modules/typesense/lib/Typesense/Debug.js")); +var Metrics_1 = __importDefault(__webpack_require__(/*! ./Metrics */ "./node_modules/typesense/lib/Typesense/Metrics.js")); +var Health_1 = __importDefault(__webpack_require__(/*! ./Health */ "./node_modules/typesense/lib/Typesense/Health.js")); +var Operations_1 = __importDefault(__webpack_require__(/*! ./Operations */ "./node_modules/typesense/lib/Typesense/Operations.js")); +var MultiSearch_1 = __importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); +var Presets_1 = __importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); +var Preset_1 = __importDefault(__webpack_require__(/*! ./Preset */ "./node_modules/typesense/lib/Typesense/Preset.js")); +var Analytics_1 = __importDefault(__webpack_require__(/*! ./Analytics */ "./node_modules/typesense/lib/Typesense/Analytics.js")); +var Stopwords_1 = __importDefault(__webpack_require__(/*! ./Stopwords */ "./node_modules/typesense/lib/Typesense/Stopwords.js")); +var Stopword_1 = __importDefault(__webpack_require__(/*! ./Stopword */ "./node_modules/typesense/lib/Typesense/Stopword.js")); +var Conversations_1 = __importDefault(__webpack_require__(/*! ./Conversations */ "./node_modules/typesense/lib/Typesense/Conversations.js")); +var Conversation_1 = __importDefault(__webpack_require__(/*! ./Conversation */ "./node_modules/typesense/lib/Typesense/Conversation.js")); +var Client = /** @class */ (function () { + function Client(options) { + var _a; + options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false; + this.configuration = new Configuration_1.default(options); + this.apiCall = new ApiCall_1.default(this.configuration); + this.debug = new Debug_1.default(this.apiCall); + this.metrics = new Metrics_1.default(this.apiCall); + this.health = new Health_1.default(this.apiCall); + this.operations = new Operations_1.default(this.apiCall); + this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration); + this._collections = new Collections_1.default(this.apiCall); + this.individualCollections = {}; + this._aliases = new Aliases_1.default(this.apiCall); + this.individualAliases = {}; + this._keys = new Keys_1.default(this.apiCall); + this.individualKeys = {}; + this._presets = new Presets_1.default(this.apiCall); + this.individualPresets = {}; + this._stopwords = new Stopwords_1.default(this.apiCall); + this.individualStopwords = {}; + this.analytics = new Analytics_1.default(this.apiCall); + this._conversations = new Conversations_1.default(this.apiCall); + this.individualConversations = {}; + } + Client.prototype.collections = function (collectionName) { + if (collectionName === undefined) { + return this._collections; + } + else { + if (this.individualCollections[collectionName] === undefined) { + this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration); + } + return this.individualCollections[collectionName]; + } + }; + Client.prototype.aliases = function (aliasName) { + if (aliasName === undefined) { + return this._aliases; + } + else { + if (this.individualAliases[aliasName] === undefined) { + this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall); + } + return this.individualAliases[aliasName]; + } + }; + Client.prototype.keys = function (id) { + if (id === undefined) { + return this._keys; + } + else { + if (this.individualKeys[id] === undefined) { + this.individualKeys[id] = new Key_1.default(id, this.apiCall); + } + return this.individualKeys[id]; + } + }; + Client.prototype.presets = function (id) { + if (id === undefined) { + return this._presets; + } + else { + if (this.individualPresets[id] === undefined) { + this.individualPresets[id] = new Preset_1.default(id, this.apiCall); + } + return this.individualPresets[id]; + } + }; + Client.prototype.stopwords = function (id) { + if (id === undefined) { + return this._stopwords; + } + else { + if (this.individualStopwords[id] === undefined) { + this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall); + } + return this.individualStopwords[id]; + } + }; + Client.prototype.conversations = function (id) { + if (id === undefined) { + return this._conversations; + } + else { + if (this.individualConversations[id] === undefined) { + this.individualConversations[id] = new Conversation_1.default(id, this.apiCall); + } + return this.individualConversations[id]; + } + }; + return Client; +}()); +exports["default"] = Client; +//# sourceMappingURL=Client.js.map /***/ }), -/***/ "./src/Configuration.js": -/*!******************************!*\ - !*** ./src/Configuration.js ***! - \******************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Collection.js": +/*!************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Collection.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ Configuration: () => (/* binding */ Configuration) -/* harmony export */ }); -/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); -/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); - - - - -var Configuration = /*#__PURE__*/function () { - function Configuration() { - var _this$server$cacheSea, - _options$additionalSe, - _ref, - _this$additionalSearc, - _ref2, - _this$additionalSearc2, - _ref3, - _this$additionalSearc3, - _ref4, - _this$additionalSearc4, - _options$geoLocationF, - _options$facetableFie, - _options$collectionSp, - _this = this, - _options$flattenGroup, - _options$facetByOptio, - _options$filterByOpti, - _options$sortByOption, - _options$collectionSp2, - _options$collectionSp3, - _options$collectionSp4; - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Configuration); - this.server = options.server || { - nodes: [{ - host: "localhost", - port: "8108", - path: "", - protocol: "http" - }] - }; - this.server.cacheSearchResultsForSeconds = (_this$server$cacheSea = this.server.cacheSearchResultsForSeconds) !== null && _this$server$cacheSea !== void 0 ? _this$server$cacheSea : 2 * 60; - this.additionalSearchParameters = (_options$additionalSe = options.additionalSearchParameters) !== null && _options$additionalSe !== void 0 ? _options$additionalSe : {}; - this.additionalSearchParameters.query_by = (_ref = (_this$additionalSearc = this.additionalSearchParameters.queryBy) !== null && _this$additionalSearc !== void 0 ? _this$additionalSearc : this.additionalSearchParameters.query_by) !== null && _ref !== void 0 ? _ref : ""; - this.additionalSearchParameters.preset = (_ref2 = (_this$additionalSearc2 = this.additionalSearchParameters.preset) !== null && _this$additionalSearc2 !== void 0 ? _this$additionalSearc2 : this.additionalSearchParameters.preset) !== null && _ref2 !== void 0 ? _ref2 : ""; - this.additionalSearchParameters.sort_by = (_ref3 = (_this$additionalSearc3 = this.additionalSearchParameters.sortBy) !== null && _this$additionalSearc3 !== void 0 ? _this$additionalSearc3 : this.additionalSearchParameters.sort_by) !== null && _ref3 !== void 0 ? _ref3 : ""; - this.additionalSearchParameters.highlight_full_fields = (_ref4 = (_this$additionalSearc4 = this.additionalSearchParameters.highlightFullFields) !== null && _this$additionalSearc4 !== void 0 ? _this$additionalSearc4 : this.additionalSearchParameters.highlight_full_fields) !== null && _ref4 !== void 0 ? _ref4 : this.additionalSearchParameters.query_by; - this.geoLocationField = (_options$geoLocationF = options.geoLocationField) !== null && _options$geoLocationF !== void 0 ? _options$geoLocationF : "_geoloc"; - this.facetableFieldsWithSpecialCharacters = (_options$facetableFie = options.facetableFieldsWithSpecialCharacters) !== null && _options$facetableFie !== void 0 ? _options$facetableFie : []; - this.collectionSpecificSearchParameters = (_options$collectionSp = options.collectionSpecificSearchParameters) !== null && _options$collectionSp !== void 0 ? _options$collectionSp : {}; - Object.keys(this.collectionSpecificSearchParameters).forEach(function (collection) { - var _params$queryBy, _params$preset, _params$sortBy, _ref5, _ref6, _params$highlightFull; - var params = _this.collectionSpecificSearchParameters[collection]; - params.query_by = (_params$queryBy = params.queryBy) !== null && _params$queryBy !== void 0 ? _params$queryBy : params.query_by; - params.preset = (_params$preset = params.preset) !== null && _params$preset !== void 0 ? _params$preset : params.preset; - params.sort_by = (_params$sortBy = params.sortBy) !== null && _params$sortBy !== void 0 ? _params$sortBy : params.sort_by; - params.highlight_full_fields = (_ref5 = (_ref6 = (_params$highlightFull = params.highlightFullFields) !== null && _params$highlightFull !== void 0 ? _params$highlightFull : params.highlight_full_fields) !== null && _ref6 !== void 0 ? _ref6 : _this.additionalSearchParameters.highlight_full_fields) !== null && _ref5 !== void 0 ? _ref5 : params.query_by; - // Remove undefined values - Object.keys(params).forEach(function (key) { - return params[key] === undefined ? delete params[key] : {}; - }); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); - this.renderingContent = options.renderingContent; - this.flattenGroupedHits = (_options$flattenGroup = options.flattenGroupedHits) !== null && _options$flattenGroup !== void 0 ? _options$flattenGroup : true; - this.facetByOptions = (_options$facetByOptio = options.facetByOptions) !== null && _options$facetByOptio !== void 0 ? _options$facetByOptio : {}; - this.filterByOptions = (_options$filterByOpti = options.filterByOptions) !== null && _options$filterByOpti !== void 0 ? _options$filterByOpti : {}; - this.sortByOptions = (_options$sortByOption = options.sortByOptions) !== null && _options$sortByOption !== void 0 ? _options$sortByOption : {}; - this.collectionSpecificFacetByOptions = (_options$collectionSp2 = options.collectionSpecificFacetByOptions) !== null && _options$collectionSp2 !== void 0 ? _options$collectionSp2 : {}; - this.collectionSpecificFilterByOptions = (_options$collectionSp3 = options.collectionSpecificFilterByOptions) !== null && _options$collectionSp3 !== void 0 ? _options$collectionSp3 : {}; - this.collectionSpecificSortByOptions = (_options$collectionSp4 = options.collectionSpecificSortByOptions) !== null && _options$collectionSp4 !== void 0 ? _options$collectionSp4 : {}; - } - return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Configuration, [{ - key: "validate", - value: function validate() { - // Warn if camelCased parameters are used, suggest using snake_cased parameters instead - if (this.additionalSearchParameters.queryBy || Object.values(this.collectionSpecificSearchParameters).some(function (c) { - return c.queryBy; - })) { - console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version." + " We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."); - } - - /* - * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or - * All collectionSpecificSearchParameters need to have query_by or preset - * - * */ - if (this.additionalSearchParameters.query_by.length === 0 && this.additionalSearchParameters.preset.length === 0 && (Object.keys(this.collectionSpecificSearchParameters).length === 0 || Object.values(this.collectionSpecificSearchParameters).some(function (c) { - return (c.query_by || "").length === 0 && (c.preset || "").length === 0; - }))) { - throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set."); - } +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - }]); -}(); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Documents_1 = __importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); +var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); +var Overrides_1 = __importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); +var Override_1 = __importDefault(__webpack_require__(/*! ./Override */ "./node_modules/typesense/lib/Typesense/Override.js")); +var Synonyms_1 = __importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); +var Synonym_1 = __importDefault(__webpack_require__(/*! ./Synonym */ "./node_modules/typesense/lib/Typesense/Synonym.js")); +var Document_1 = __webpack_require__(/*! ./Document */ "./node_modules/typesense/lib/Typesense/Document.js"); +var Collection = /** @class */ (function () { + function Collection(name, apiCall, configuration) { + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this.individualDocuments = {}; + this.individualOverrides = {}; + this.individualSynonyms = {}; + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration); + this._overrides = new Overrides_1.default(this.name, this.apiCall); + this._synonyms = new Synonyms_1.default(this.name, this.apiCall); + } + Collection.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Collection.prototype.update = function (schema) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)]; + }); + }); + }; + Collection.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + Collection.prototype.exists = function () { + return __awaiter(this, void 0, void 0, function () { + var e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, this.retrieve()]; + case 1: + _a.sent(); + return [2 /*return*/, true]; + case 2: + e_1 = _a.sent(); + if (e_1 instanceof Errors_1.ObjectNotFound) + return [2 /*return*/, false]; + throw e_1; + case 3: return [2 /*return*/]; + } + }); + }); + }; + Collection.prototype.documents = function (documentId) { + if (!documentId) { + return this._documents; + } + else { + if (this.individualDocuments[documentId] === undefined) { + this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall); + } + return this.individualDocuments[documentId]; + } + }; + Collection.prototype.overrides = function (overrideId) { + if (overrideId === undefined) { + return this._overrides; + } + else { + if (this.individualOverrides[overrideId] === undefined) { + this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall); + } + return this.individualOverrides[overrideId]; + } + }; + Collection.prototype.synonyms = function (synonymId) { + if (synonymId === undefined) { + return this._synonyms; + } + else { + if (this.individualSynonyms[synonymId] === undefined) { + this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall); + } + return this.individualSynonyms[synonymId]; + } + }; + Collection.prototype.endpointPath = function () { + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.name); + }; + return Collection; +}()); +exports["default"] = Collection; +//# sourceMappingURL=Collection.js.map /***/ }), -/***/ "./src/FacetSearchResponseAdapter.js": -/*!*******************************************!*\ - !*** ./src/FacetSearchResponseAdapter.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Collections.js": +/*!*************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Collections.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FacetSearchResponseAdapter: () => (/* binding */ FacetSearchResponseAdapter) -/* harmony export */ }); -/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); -/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); -/* harmony import */ var _support_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./support/utils */ "./src/support/utils.js"); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/collections"; +var Collections = /** @class */ (function () { + function Collections(apiCall) { + this.apiCall = apiCall; + } + Collections.prototype.create = function (schema, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)]; + }); + }); + }; + Collections.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); + }); + }; + Object.defineProperty(Collections, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Collections; +}()); +exports["default"] = Collections; +//# sourceMappingURL=Collections.js.map +/***/ }), +/***/ "./node_modules/typesense/lib/Typesense/Configuration.js": +/*!***************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Configuration.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +"use strict"; -var FacetSearchResponseAdapter = /*#__PURE__*/function () { - function FacetSearchResponseAdapter(typesenseResponse, instantsearchRequest) { - (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, FacetSearchResponseAdapter); - this.typesenseResponse = typesenseResponse; - this.instantsearchRequest = instantsearchRequest; - } - return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(FacetSearchResponseAdapter, [{ - key: "_adaptFacetHits", - value: function _adaptFacetHits(typesenseFacetCounts) { - var _this = this; - var adaptedResult = {}; - var facet = typesenseFacetCounts.find(function (facet) { - return facet.field_name === _this.instantsearchRequest.params.facetName; - }); - adaptedResult = facet.counts.map(function (facetCount) { - return { - value: facetCount.value, - highlighted: _this._adaptHighlightTag(facetCount.highlighted, _this.instantsearchRequest.params.highlightPreTag, _this.instantsearchRequest.params.highlightPostTag), - count: facetCount.count - }; - }); - return adaptedResult; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - }, { - key: "adapt", - value: function adapt() { - var adaptedResult = { - facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts), - exhaustiveFacetsCount: true, - processingTimeMS: this.typesenseResponse.search_time_ms - }; - return adaptedResult; + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var logger = __importStar(__webpack_require__(/*! loglevel */ "./node_modules/loglevel/lib/loglevel.js")); +var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); +var Configuration = /** @class */ (function () { + function Configuration(options) { + var _this = this; + this.nodes = options.nodes || []; + this.nodes = this.nodes + .map(function (node) { return _this.setDefaultPathInNode(node); }) + .map(function (node) { return _this.setDefaultPortInNode(node); }) + .map(function (node) { return (__assign({}, node)); }); // Make a deep copy + if (options.randomizeNodes == null) { + options.randomizeNodes = true; + } + if (options.randomizeNodes === true) { + this.shuffleArray(this.nodes); + } + this.nearestNode = options.nearestNode; + this.nearestNode = this.setDefaultPathInNode(this.nearestNode); + this.nearestNode = this.setDefaultPortInNode(this.nearestNode); + this.connectionTimeoutSeconds = + options.connectionTimeoutSeconds || options.timeoutSeconds || 5; + this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60; + this.numRetries = + options.numRetries || + this.nodes.length + (this.nearestNode == null ? 0 : 1) || + 3; + this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1; + this.apiKey = options.apiKey; + this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient + this.cacheSearchResultsForSeconds = + options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default + this.useServerSideSearchCache = options.useServerSideSearchCache || false; + this.logger = options.logger || logger; + this.logLevel = options.logLevel || "warn"; + this.logger.setLevel(this.logLevel); + this.additionalHeaders = options.additionalHeaders; + this.httpAgent = options.httpAgent; + this.httpsAgent = options.httpsAgent; + this.showDeprecationWarnings(options); + this.validate(); } - }]); -}(); -Object.assign(FacetSearchResponseAdapter.prototype, _support_utils__WEBPACK_IMPORTED_MODULE_2__.utils); + Configuration.prototype.validate = function () { + if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) { + throw new Errors_1.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set"); + } + if (this.nearestNode != null && + this.isNodeMissingAnyParameters(this.nearestNode)) { + throw new Errors_1.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set"); + } + if (this.apiKey == null) { + throw new Errors_1.MissingConfigurationError("Ensure that apiKey is set"); + } + return true; + }; + Configuration.prototype.validateNodes = function () { + var _this = this; + return this.nodes.some(function (node) { + return _this.isNodeMissingAnyParameters(node); + }); + }; + Configuration.prototype.isNodeMissingAnyParameters = function (node) { + return (!["protocol", "host", "port", "path"].every(function (key) { + return node.hasOwnProperty(key); + }) && node["url"] == null); + }; + Configuration.prototype.setDefaultPathInNode = function (node) { + if (node != null && !node.hasOwnProperty("path")) { + node["path"] = ""; + } + return node; + }; + Configuration.prototype.setDefaultPortInNode = function (node) { + if (node != null && + !node.hasOwnProperty("port") && + node.hasOwnProperty("protocol")) { + switch (node["protocol"]) { + case "https": + node["port"] = 443; + break; + case "http": + node["port"] = 80; + break; + } + } + return node; + }; + Configuration.prototype.showDeprecationWarnings = function (options) { + if (options.timeoutSeconds) { + this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"); + } + if (options.masterNode) { + this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"); + } + if (options.readReplicaNodes) { + this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12"); + } + }; + Configuration.prototype.shuffleArray = function (array) { + var _a; + for (var i = array.length - 1; i > 0; i--) { + var j = Math.floor(Math.random() * (i + 1)); + _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1]; + } + }; + return Configuration; +}()); +exports["default"] = Configuration; +//# sourceMappingURL=Configuration.js.map /***/ }), -/***/ "./src/SearchRequestAdapter.js": -/*!*************************************!*\ - !*** ./src/SearchRequestAdapter.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Conversation.js": +/*!**************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Conversation.js ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ SearchRequestAdapter: () => (/* binding */ SearchRequestAdapter) -/* harmony export */ }); -/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); -/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); -/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); -/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); -/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); -/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); -/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__); - - - - - - -var _excluded = ["q", "conversation", "conversation_id", "conversation_model_id"]; - -var SearchRequestAdapter = /*#__PURE__*/function () { - function SearchRequestAdapter(instantsearchRequests, typesenseClient, configuration) { - (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__["default"])(this, SearchRequestAdapter); - this.instantsearchRequests = instantsearchRequests; - this.typesenseClient = typesenseClient; - this.configuration = configuration; - this.additionalSearchParameters = configuration.additionalSearchParameters; - this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters; - } - return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__["default"])(SearchRequestAdapter, [{ - key: "_shouldUseExactMatchForField", - value: function _shouldUseExactMatchForField(fieldName, collectionName) { - var _this$configuration$c, _this$configuration$f; - if (((_this$configuration$c = this.configuration.collectionSpecificFilterByOptions) === null || _this$configuration$c === void 0 || (_this$configuration$c = _this$configuration$c[collectionName]) === null || _this$configuration$c === void 0 || (_this$configuration$c = _this$configuration$c[fieldName]) === null || _this$configuration$c === void 0 ? void 0 : _this$configuration$c.exactMatch) === false || ((_this$configuration$f = this.configuration.filterByOptions) === null || _this$configuration$f === void 0 || (_this$configuration$f = _this$configuration$f[fieldName]) === null || _this$configuration$f === void 0 ? void 0 : _this$configuration$f.exactMatch) === false) { - return false; - } else { - return true; - } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - }, { - key: "_adaptFacetFilters", - value: function _adaptFacetFilters(facetFilters, collectionName) { - var _this = this; - var adaptedResult = ""; - if (!facetFilters) { - return adaptedResult; - } - - /** - * Need to transform: - * facetFilters = [["field1:value1", "field1:value2"], "field2:value3", "field2:value4"] - * - * Into this: - * field1:=[value1,value2] && field2:=value3 && field2:=value4 - * - * Steps: - * - For each item in facetFilters - * - If item is array - * - OR values together. - * - Warn if field names are not the same - * - If item is string, convert to facet:=value format - * - Join strings by && - */ - - var transformedTypesenseFilters = facetFilters.map(function (item) { - if (Array.isArray(item)) { - // Need to transform: - // facetFilters = ["field1:value1", "field1:value2", "facetN:valueN"] - // - // Into this: - // intermediateFacetFilters = { - // "field1": ["value1", "value2"], - // "fieldN": ["valueN"] - // } - - var intermediateFacetFilters = {}; - item.forEach(function (facetFilter) { - var _this$_parseFacetFilt = _this._parseFacetFilter(facetFilter), - fieldName = _this$_parseFacetFilt.fieldName, - fieldValue = _this$_parseFacetFilt.fieldValue; - intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || []; - intermediateFacetFilters[fieldName].push(fieldValue); - }); - if (Object.keys(intermediateFacetFilters).length > 1) { - console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(intermediateFacetFilters).join(","))); - } - - // Pick first value from intermediateFacetFilters - var fieldName = Object.keys(intermediateFacetFilters)[0]; - var fieldValues = intermediateFacetFilters[fieldName]; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Conversations_1 = __importDefault(__webpack_require__(/*! ./Conversations */ "./node_modules/typesense/lib/Typesense/Conversations.js")); +var Conversation = /** @class */ (function () { + function Conversation(id, apiCall) { + this.id = id; + this.apiCall = apiCall; + } + Conversation.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Conversation.prototype.update = function (params) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)]; + }); + }); + }; + Conversation.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + Conversation.prototype.endpointPath = function () { + return "".concat(Conversations_1.default.RESOURCEPATH, "/").concat(this.id); + }; + return Conversation; +}()); +exports["default"] = Conversation; +//# sourceMappingURL=Conversation.js.map - // Need to transform: - // intermediateFacetFilters = { - // "field1": ["value1", "value2"], - // } - // - // Into this: - // field1:=[value1,value2] +/***/ }), - // Partition values into included and excluded values - var _fieldValues$reduce = fieldValues.reduce(function (result, fieldValue) { - if (fieldValue.startsWith("-") && !_this._isNumber(fieldValue)) { - result[0].push(fieldValue.substring(1)); - } else { - result[1].push(fieldValue); - } - return result; - }, [[], []]), - _fieldValues$reduce2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_fieldValues$reduce, 2), - excludedFieldValues = _fieldValues$reduce2[0], - includedFieldValues = _fieldValues$reduce2[1]; - var typesenseFilterStringComponents = []; - if (includedFieldValues.length > 0) { - var operator = _this._shouldUseExactMatchForField(fieldName, collectionName) ? ":=" : ":"; - typesenseFilterStringComponents.push("".concat(fieldName).concat(operator, "[").concat(includedFieldValues.map(function (v) { - return _this._escapeFacetValue(v); - }).join(","), "]")); - } - if (excludedFieldValues.length > 0) { - var _operator = _this._shouldUseExactMatchForField(fieldName, collectionName) ? ":!=" : ":!"; - typesenseFilterStringComponents.push("".concat(fieldName).concat(_operator, "[").concat(excludedFieldValues.map(function (v) { - return _this._escapeFacetValue(v); - }).join(","), "]")); - } - var typesenseFilterString = typesenseFilterStringComponents.filter(function (f) { - return f; - }).join(" && "); - return typesenseFilterString; - } else { - // Need to transform: - // fieldName:fieldValue - // Into - // fieldName:=fieldValue +/***/ "./node_modules/typesense/lib/Typesense/ConversationModel.js": +/*!*******************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/ConversationModel.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - var _this$_parseFacetFilt2 = _this._parseFacetFilter(item), - _fieldName = _this$_parseFacetFilt2.fieldName, - fieldValue = _this$_parseFacetFilt2.fieldValue; - var _typesenseFilterString; - if (fieldValue.startsWith("-") && !_this._isNumber(fieldValue)) { - var _operator2 = _this._shouldUseExactMatchForField(_fieldName, collectionName) ? ":!=" : ":!"; - _typesenseFilterString = "".concat(_fieldName).concat(_operator2, "[").concat(_this._escapeFacetValue(fieldValue.substring(1)), "]"); - } else { - var _operator3 = _this._shouldUseExactMatchForField(_fieldName, collectionName) ? ":=" : ":"; - _typesenseFilterString = "".concat(_fieldName).concat(_operator3, "[").concat(_this._escapeFacetValue(fieldValue), "]"); - } - return _typesenseFilterString; - } - }); - adaptedResult = transformedTypesenseFilters.join(" && "); - // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`); +"use strict"; - return adaptedResult; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - }, { - key: "_parseFacetFilter", - value: function _parseFacetFilter(facetFilter) { - var _this$configuration$f2; - var filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue; - - // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`. - // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that. - if (((_this$configuration$f2 = this.configuration.facetableFieldsWithSpecialCharacters) === null || _this$configuration$f2 === void 0 ? void 0 : _this$configuration$f2.length) > 0) { - // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping - var sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.flat().map(function (f) { - return f.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ConversationModels_1 = __importDefault(__webpack_require__(/*! ./ConversationModels */ "./node_modules/typesense/lib/Typesense/ConversationModels.js")); +var ConversationModel = /** @class */ (function () { + function ConversationModel(id, apiCall) { + this.id = id; + this.apiCall = apiCall; + } + ConversationModel.prototype.update = function (params) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)]; + }); }); - filterStringMatchingRegex = new RegExp("^(".concat(sanitizedFacetableFieldsWithSpecialCharacters.join("|"), "):(.*)$")); - facetFilterMatches = facetFilter.match(filterStringMatchingRegex); - if (facetFilterMatches != null) { - fieldName = "".concat(facetFilterMatches[1]); - fieldValue = "".concat(facetFilterMatches[2]); - return { - fieldName: fieldName, - fieldValue: fieldValue - }; - } - } + }; + ConversationModel.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + ConversationModel.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + ConversationModel.prototype.endpointPath = function () { + return "".concat(ConversationModels_1.default.RESOURCEPATH, "/").concat(this.id); + }; + return ConversationModel; +}()); +exports["default"] = ConversationModel; +//# sourceMappingURL=ConversationModel.js.map - // If we haven't found any matches yet - // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values - filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX; - facetFilterMatches = facetFilter.match(filterStringMatchingRegex); +/***/ }), - // console.log(filterStringMatchingRegex); - // console.log(facetFilter); - // console.log(facetFilterMatches); +/***/ "./node_modules/typesense/lib/Typesense/ConversationModels.js": +/*!********************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/ConversationModels.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, exports) { - if (facetFilterMatches == null) { - console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(facetFilter, "` with the Regex `").concat(filterStringMatchingRegex, "`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")); - } else { - fieldName = "".concat(facetFilterMatches[1]).concat(facetFilterMatches[2]); - fieldValue = "".concat(facetFilterMatches[3]); - } - return { - fieldName: fieldName, - fieldValue: fieldValue - }; - } - }, { - key: "_escapeFacetValue", - value: function _escapeFacetValue(value) { - // Don't escape booleans, integers or floats - if (typeof value === "boolean" || value === "true" || value === "false" || this._isNumber(value)) { - return value; - } - return "`".concat(value, "`"); +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - }, { - key: "_isNumber", - value: function _isNumber(value) { - return Number.isInteger(value % 1) || - // Mod 1 will automatically try converting string values to integer/float - !!(value % 1); // Is Float +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/conversations/models"; +var ConversationModels = /** @class */ (function () { + function ConversationModels(apiCall) { + this.apiCall = apiCall; + this.apiCall = apiCall; } - }, { - key: "_adaptNumericFilters", - value: function _adaptNumericFilters(numericFilters) { - var _this2 = this; - // Need to transform this: - // ["field1<=634", "field1>=289", "field2<=5", "field3>=3"] - // to: - // "field1:=[634..289] && field2:<=5 && field3:>=3" - var adaptedResult = ""; - if (!numericFilters) { - return adaptedResult; - } + ConversationModels.prototype.create = function (params) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)]; + }); + }); + }; + ConversationModels.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + ConversationModels.prototype.endpointPath = function (operation) { + return "".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + }; + Object.defineProperty(ConversationModels, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return ConversationModels; +}()); +exports["default"] = ConversationModels; +//# sourceMappingURL=ConversationModels.js.map - // Transform to intermediate structure: - // { - // field1: { - // "<=": 634, - // ">=": 289 - // }, - // field2: { - // "<=": 5 - // }, - // field3: { - // ">=": 3 - // } - // }; - var filtersHash = {}; - numericFilters.forEach(function (filter) { - var _this2$_parseNumericF = _this2._parseNumericFilter(filter), - fieldName = _this2$_parseNumericF.fieldName, - operator = _this2$_parseNumericF.operator, - fieldValue = _this2$_parseNumericF.fieldValue; - filtersHash[fieldName] = filtersHash[fieldName] || {}; - filtersHash[fieldName][operator] = fieldValue; - }); +/***/ }), - // Transform that to: - // "field1:=[634..289] && field2:<=5 && field3:>=3" - var adaptedFilters = []; - Object.keys(filtersHash).forEach(function (field) { - if (filtersHash[field]["<="] != null && filtersHash[field][">="] != null) { - adaptedFilters.push("".concat(field, ":=[").concat(filtersHash[field][">="], "..").concat(filtersHash[field]["<="], "]")); - } else if (filtersHash[field]["<="] != null) { - adaptedFilters.push("".concat(field, ":<=").concat(filtersHash[field]["<="])); - } else if (filtersHash[field][">="] != null) { - adaptedFilters.push("".concat(field, ":>=").concat(filtersHash[field][">="])); - } else if (filtersHash[field]["="] != null) { - adaptedFilters.push("".concat(field, ":=").concat(filtersHash[field]["="])); - } else { - console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(filtersHash[field]))); - } - }); - adaptedResult = adaptedFilters.join(" && "); - return adaptedResult; - } - }, { - key: "_parseNumericFilter", - value: function _parseNumericFilter(numericFilter) { - var _this$configuration$f3; - var filterStringMatchingRegex, numericFilterMatches; - var fieldName, operator, fieldValue; +/***/ "./node_modules/typesense/lib/Typesense/Conversations.js": +/*!***************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Conversations.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly. - // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that. - if (((_this$configuration$f3 = this.configuration.facetableFieldsWithSpecialCharacters) === null || _this$configuration$f3 === void 0 ? void 0 : _this$configuration$f3.length) > 0) { - // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping - var sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(function (f) { - return f.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ConversationModels_1 = __importDefault(__webpack_require__(/*! ./ConversationModels */ "./node_modules/typesense/lib/Typesense/ConversationModels.js")); +var ConversationModel_1 = __importDefault(__webpack_require__(/*! ./ConversationModel */ "./node_modules/typesense/lib/Typesense/ConversationModel.js")); +var RESOURCEPATH = "/conversations"; +var Conversations = /** @class */ (function () { + function Conversations(apiCall) { + this.apiCall = apiCall; + this.individualConversationModels = {}; + this.apiCall = apiCall; + this._conversationsModels = new ConversationModels_1.default(this.apiCall); + } + Conversations.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); }); - filterStringMatchingRegex = new RegExp("^(".concat(sanitizedFacetableFieldsWithSpecialCharacters.join("|"), ")(<=|>=|>|<|=)(.*)$")); - numericFilterMatches = numericFilter.match(filterStringMatchingRegex); - if (numericFilterMatches != null) { - // If no matches are found or if the above didn't trigger, fall back to the default regex - var _numericFilterMatches = numericFilterMatches; - var _numericFilterMatches2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_numericFilterMatches, 4); - fieldName = _numericFilterMatches2[1]; - operator = _numericFilterMatches2[2]; - fieldValue = _numericFilterMatches2[3]; - return { - fieldName: fieldName, - operator: operator, - fieldValue: fieldValue - }; + }; + Conversations.prototype.models = function (id) { + if (id === undefined) { + return this._conversationsModels; } - } + else { + if (this.individualConversationModels[id] === undefined) { + this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall); + } + return this.individualConversationModels[id]; + } + }; + Object.defineProperty(Conversations, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Conversations; +}()); +exports["default"] = Conversations; +//# sourceMappingURL=Conversations.js.map - // If we haven't found any matches yet, fall back to the default regex - filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX; - numericFilterMatches = numericFilter.match(filterStringMatchingRegex); +/***/ }), - // console.log(filterStringMatchingRegex); - // console.log(numericFilter); - // console.log(numericFilterMatches); +/***/ "./node_modules/typesense/lib/Typesense/Debug.js": +/*!*******************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Debug.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports) { - if (numericFilterMatches == null) { - console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(numericFilter, "` with the Regex `").concat(filterStringMatchingRegex, "`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")); - } else { - var _numericFilterMatches3 = numericFilterMatches; - var _numericFilterMatches4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_numericFilterMatches3, 4); - fieldName = _numericFilterMatches4[1]; - operator = _numericFilterMatches4[2]; - fieldValue = _numericFilterMatches4[3]; - } - return { - fieldName: fieldName, - operator: operator, - fieldValue: fieldValue - }; - } - }, { - key: "_adaptGeoFilter", - value: function _adaptGeoFilter(_ref) { - var insideBoundingBox = _ref.insideBoundingBox, - aroundRadius = _ref.aroundRadius, - aroundLatLng = _ref.aroundLatLng, - insidePolygon = _ref.insidePolygon; - // Give this parameter first priority if it exists, since - if (insideBoundingBox) { - var x1, y1, x2, y2; - if (Array.isArray(insideBoundingBox)) { - var _insideBoundingBox$fl = insideBoundingBox.flat(); - var _insideBoundingBox$fl2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_insideBoundingBox$fl, 4); - x1 = _insideBoundingBox$fl2[0]; - y1 = _insideBoundingBox$fl2[1]; - x2 = _insideBoundingBox$fl2[2]; - y2 = _insideBoundingBox$fl2[3]; - } else { - var _insideBoundingBox$sp = insideBoundingBox.split(","); - var _insideBoundingBox$sp2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_insideBoundingBox$sp, 4); - x1 = _insideBoundingBox$sp2[0]; - y1 = _insideBoundingBox$sp2[1]; - x2 = _insideBoundingBox$sp2[2]; - y2 = _insideBoundingBox$sp2[3]; - } - return "".concat(this.configuration.geoLocationField, ":(").concat(x1, ", ").concat(y1, ", ").concat(x1, ", ").concat(y2, ", ").concat(x2, ", ").concat(y2, ", ").concat(x2, ", ").concat(y1, ")"); - } - if (aroundLatLng || aroundRadius) { - if (!aroundRadius || aroundRadius === "all") { - throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. " + "So the `aroundRadius` parameter is required when `aroundLatLng` is used. " + "If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget)."); - } - var adaptedAroundRadius = "".concat(parseFloat(aroundRadius) / 1000, " km"); // aroundRadius is in meters - return "".concat(this.configuration.geoLocationField, ":(").concat(aroundLatLng, ", ").concat(adaptedAroundRadius, ")"); - } - if (insidePolygon) { - var coordinates = insidePolygon; - if (Array.isArray(insidePolygon)) { - coordinates = insidePolygon.flat().join(","); - } - return "".concat(this.configuration.geoLocationField, ":(").concat(coordinates, ")"); - } - } - }, { - key: "_adaptFilters", - value: function _adaptFilters(instantsearchParams, collectionName) { - var adaptedFilters = []; +"use strict"; - // `filters` can be used with the `Configure` widget - // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format. - if (instantsearchParams.filters) { - adaptedFilters.push(instantsearchParams.filters); - } - adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName)); - adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters)); - adaptedFilters.push(this._adaptGeoFilter(instantsearchParams)); - return adaptedFilters.filter(function (filter) { - return filter && filter !== ""; - }).join(" && "); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - }, { - key: "_adaptIndexName", - value: function _adaptIndexName(indexName) { - return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/debug"; +var Debug = /** @class */ (function () { + function Debug(apiCall) { + this.apiCall = apiCall; } - }, { - key: "_adaptSortBy", - value: function _adaptSortBy(indexName) { - return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]; + Debug.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); + }); + }; + return Debug; +}()); +exports["default"] = Debug; +//# sourceMappingURL=Debug.js.map + +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/Document.js": +/*!**********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Document.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - }, { - key: "_adaptFacetBy", - value: function _adaptFacetBy(facets, collectionName) { - var _this3 = this; - return [facets].flat().map(function (facet) { - var _this3$configuration$; - if ((_this3$configuration$ = _this3.configuration.collectionSpecificFacetByOptions) !== null && _this3$configuration$ !== void 0 && (_this3$configuration$ = _this3$configuration$[collectionName]) !== null && _this3$configuration$ !== void 0 && _this3$configuration$[facet]) { - return "".concat(facet).concat(_this3.configuration.collectionSpecificFacetByOptions[collectionName][facet]); - } else if (_this3.configuration.facetByOptions[facet]) { - return "".concat(facet).concat(_this3.configuration.facetByOptions[facet]); - } else { - return facet; - } - }).join(","); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Document = void 0; +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Documents_1 = __importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); +var Document = /** @class */ (function () { + function Document(collectionName, documentId, apiCall) { + this.collectionName = collectionName; + this.documentId = documentId; + this.apiCall = apiCall; } - }, { - key: "_buildSearchParameters", - value: function _buildSearchParameters(instantsearchRequest) { - var _this$configuration$c2, _this$configuration$s; - var params = instantsearchRequest.params; - var indexName = instantsearchRequest.indexName; - var adaptedCollectionName = this._adaptIndexName(indexName); + Document.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Document.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + Document.prototype.update = function (partialDocument, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)]; + }); + }); + }; + Document.prototype.endpointPath = function () { + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, "/").concat(this.documentId); + }; + return Document; +}()); +exports.Document = Document; +//# sourceMappingURL=Document.js.map - // Convert all common parameters to snake case - var snakeCasedAdditionalSearchParameters = {}; - for (var _i = 0, _Object$entries = Object.entries(this.additionalSearchParameters); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_Object$entries[_i], 2), - key = _Object$entries$_i[0], - value = _Object$entries$_i[1]; - snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value; - } +/***/ }), - // Override, collection specific parameters - if (this.collectionSpecificSearchParameters[adaptedCollectionName]) { - for (var _i2 = 0, _Object$entries2 = Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName]); _i2 < _Object$entries2.length; _i2++) { - var _Object$entries2$_i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_Object$entries2[_i2], 2), - _key = _Object$entries2$_i[0], - _value = _Object$entries2$_i[1]; - snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(_key)] = _value; - } - } - var typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters); - var adaptedSortBy = this._adaptSortBy(indexName); - Object.assign(typesenseSearchParams, { - collection: adaptedCollectionName, - q: params.query === "" || params.query === undefined ? "*" : params.query, - facet_by: snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName), - filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by, - sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by, - max_facet_values: params.maxValuesPerFacet, - page: (params.page || 0) + 1 - }); - if (params.hitsPerPage) { - typesenseSearchParams.per_page = params.hitsPerPage; - } - if (params.facetQuery) { - typesenseSearchParams.facet_query = "".concat(params.facetName, ":").concat(params.facetQuery); - typesenseSearchParams.per_page = 0; - } +/***/ "./node_modules/typesense/lib/Typesense/Documents.js": +/*!***********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Documents.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); +var SearchOnlyDocuments_1 = __webpack_require__(/*! ./SearchOnlyDocuments */ "./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js"); +var Documents = /** @class */ (function (_super) { + __extends(Documents, _super); + function Documents(collectionName, apiCall, configuration) { + return _super.call(this, collectionName, apiCall, configuration) || this; + } + Documents.prototype.create = function (document, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (!document) + throw new Error("No document provided"); + return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)]; + }); + }); + }; + Documents.prototype.upsert = function (document, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (!document) + throw new Error("No document provided"); + return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: "upsert" }))]; + }); + }); + }; + Documents.prototype.update = function (document, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (!document) + throw new Error("No document provided"); + if (options["filter_by"] != null) { + return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))]; + } + else { + return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: "update" }))]; + } + return [2 /*return*/]; + }); + }); + }; + Documents.prototype.delete = function (query) { + if (query === void 0) { query = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)]; + }); + }); + }; + Documents.prototype.createMany = function (documents, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"); + return [2 /*return*/, this.import(documents, options)]; + }); + }); + }; + Documents.prototype.import = function (documents, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (Array.isArray(documents)) { + try { + documentsInJSONLFormat = documents + .map(function (document) { return JSON.stringify(document); }) + .join("\n"); + } + catch (error) { + // if rangeerror, throw custom error message + if (RangeError instanceof error && + (error === null || error === void 0 ? void 0 : error.includes("Too many properties to enumerate"))) { + throw new Error("".concat(error, "\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n ")); + } + // else, throw the non-range error anyways + throw new Error(error); + } + } + else { + documentsInJSONLFormat = documents; + } + return [4 /*yield*/, this.apiCall.performRequest("post", this.endpointPath("import"), { + queryParameters: options, + bodyParameters: documentsInJSONLFormat, + additionalHeaders: { "Content-Type": "text/plain" }, + skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully + })]; + case 1: + resultsInJSONLFormat = _a.sent(); + if (Array.isArray(documents)) { + resultsInJSONFormat = resultsInJSONLFormat + .split("\n") + .map(function (r) { return JSON.parse(r); }); + failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; }); + if (failedItems.length > 0) { + throw new Errors_1.ImportError("".concat(resultsInJSONFormat.length - failedItems.length, " documents imported successfully, ").concat(failedItems.length, " documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."), resultsInJSONFormat); + } + else { + return [2 /*return*/, resultsInJSONFormat]; + } + } + else { + return [2 /*return*/, resultsInJSONLFormat]; + } + return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns a JSONL string for all the documents in this collection + */ + Documents.prototype.export = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options)]; + }); + }); + }; + /** + * Returns a NodeJS readable stream of JSONL for all the documents in this collection. + */ + Documents.prototype.exportStream = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options, { + responseType: "stream", + })]; + }); + }); + }; + return Documents; +}(SearchOnlyDocuments_1.SearchOnlyDocuments)); +exports["default"] = Documents; +//# sourceMappingURL=Documents.js.map - // If a custom vector query is specified, set q=* - if (params.typesenseVectorQuery) { - typesenseSearchParams.vector_query = params.typesenseVectorQuery; - } +/***/ }), - // Allow for conditional disabling of overrides, for particular sort orders - var sortByOption = ((_this$configuration$c2 = this.configuration.collectionSpecificSortByOptions) === null || _this$configuration$c2 === void 0 || (_this$configuration$c2 = _this$configuration$c2[adaptedCollectionName]) === null || _this$configuration$c2 === void 0 ? void 0 : _this$configuration$c2[typesenseSearchParams["sort_by"]]) || ((_this$configuration$s = this.configuration.sortByOptions) === null || _this$configuration$s === void 0 ? void 0 : _this$configuration$s[typesenseSearchParams["sort_by"]]); - if ((sortByOption === null || sortByOption === void 0 ? void 0 : sortByOption["enable_overrides"]) != null) { - typesenseSearchParams["enable_overrides"] = sortByOption["enable_overrides"]; - } +/***/ "./node_modules/typesense/lib/Typesense/Errors/HTTPError.js": +/*!******************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/HTTPError.js ***! + \******************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // console.log(params); - // console.log(typesenseSearchParams); +"use strict"; - // Filter out empty or null values, so we don't accidentally override values set in presets - // eslint-disable-next-line no-unused-vars - return Object.fromEntries(Object.entries(typesenseSearchParams).filter(function (_ref2) { - var _ref3 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_ref2, 2), - _ = _ref3[0], - v = _ref3[1]; - return v != null && v !== ""; - })); - } - }, { - key: "_camelToSnakeCase", - value: function _camelToSnakeCase(str) { - return str.split(/(?=[A-Z])/).join("_").toLowerCase(); - } - }, { - key: "request", - value: function () { - var _request = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().mark(function _callee() { - var _this4 = this, - _searches$, - _searches$2; - var searches, commonParams, _searches$3, q, conversation, conversation_id, conversation_model_id; - return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - // console.log(this.instantsearchRequests); - searches = this.instantsearchRequests.map(function (instantsearchRequest) { - return _this4._buildSearchParameters(instantsearchRequest); - }); // If this is a conversational search, then move conversation related params to query params - commonParams = {}; - if (((_searches$ = searches[0]) === null || _searches$ === void 0 ? void 0 : _searches$.conversation) === true || ((_searches$2 = searches[0]) === null || _searches$2 === void 0 ? void 0 : _searches$2.conversation) === "true") { - _searches$3 = searches[0], q = _searches$3.q, conversation = _searches$3.conversation, conversation_id = _searches$3.conversation_id, conversation_model_id = _searches$3.conversation_model_id; - commonParams = { - q: q, - conversation: conversation, - conversation_id: conversation_id, - conversation_model_id: conversation_model_id - }; - searches = searches.map(function (searchParams) { - // eslint-disable-next-line no-unused-vars - var q = searchParams.q, - conversation = searchParams.conversation, - conversation_id = searchParams.conversation_id, - conversation_model_id = searchParams.conversation_model_id, - modifiedSearchParams = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(searchParams, _excluded); - return modifiedSearchParams; - }); - } - return _context.abrupt("return", this.typesenseClient.multiSearch.perform({ - searches: searches - }, commonParams)); - case 4: - case "end": - return _context.stop(); - } - }, _callee, this); - })); - function request() { - return _request.apply(this, arguments); - } - return request; - }() - }], [{ - key: "INDEX_NAME_MATCHING_REGEX", - get: function get() { - return new RegExp("^(.+?)(?=(/sort/(.*))|$)"); - } - }, { - key: "DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX", - get: function get() { - return new RegExp("(.*)((?!:).):(?!:)(.*)"); - } - }, { - key: "DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX", - get: function get() { - return new RegExp("(.*?)(<=|>=|>|<|=)(.*)"); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var HTTPError = /** @class */ (function (_super) { + __extends(HTTPError, _super); + function HTTPError() { + return _super !== null && _super.apply(this, arguments) || this; } - }]); -}(); + return HTTPError; +}(TypesenseError_1.default)); +exports["default"] = HTTPError; +//# sourceMappingURL=HTTPError.js.map /***/ }), -/***/ "./src/SearchResponseAdapter.js": -/*!**************************************!*\ - !*** ./src/SearchResponseAdapter.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Errors/ImportError.js": +/*!********************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/ImportError.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ SearchResponseAdapter: () => (/* binding */ SearchResponseAdapter) -/* harmony export */ }); -/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); -/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); -/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); -/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); -/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); -/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); -/* harmony import */ var _support_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./support/utils */ "./src/support/utils.js"); - - - - - - +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var ImportError = /** @class */ (function (_super) { + __extends(ImportError, _super); + function ImportError(message, importResults) { + var _this = _super.call(this, message) || this; + _this.importResults = importResults; + return _this; + } + return ImportError; +}(TypesenseError_1.default)); +exports["default"] = ImportError; +//# sourceMappingURL=ImportError.js.map -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } +/***/ }), -var SearchResponseAdapter = /*#__PURE__*/function () { - function SearchResponseAdapter(typesenseResponse, instantsearchRequest, configuration) { - var allTypesenseResults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; - var fullTypesenseResponse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; - (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__["default"])(this, SearchResponseAdapter); - this.typesenseResponse = typesenseResponse; - this.instantsearchRequest = instantsearchRequest; - this.configuration = configuration; - this.allTypesenseResults = allTypesenseResults; - this.fullTypesenseResponse = fullTypesenseResponse; - } - return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__["default"])(SearchResponseAdapter, [{ - key: "_adaptGroupedHits", - value: function _adaptGroupedHits(typesenseGroupedHits) { - var _this = this; - var adaptedResult = []; - adaptedResult = typesenseGroupedHits.map(function (groupedHit) { - var adaptedHits = _this._adaptHits(groupedHit.hits); - adaptedHits.forEach(function (hit) { - hit["group_key"] = hit["_group_key"] = groupedHit.group_key; - if (groupedHit.found) { - hit["_group_found"] = groupedHit.found; - } - }); - return adaptedHits; - }); +/***/ "./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js ***! + \**********************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...] - // where each element in the outermost array corresponds to a group. +"use strict"; - if (this.configuration.flattenGroupedHits) { - // We flatten it to [{}, {}, {}] - adaptedResult = adaptedResult.flat(); - } else { - // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}] - // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits - adaptedResult = adaptedResult.map(function (adaptedGroupedHit) { - return _objectSpread(_objectSpread({}, adaptedGroupedHit[0]), {}, { - _grouped_hits: adaptedGroupedHit - }); - }); - } - return adaptedResult; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var MissingConfigurationError = /** @class */ (function (_super) { + __extends(MissingConfigurationError, _super); + function MissingConfigurationError() { + return _super !== null && _super.apply(this, arguments) || this; } - }, { - key: "_adaptHits", - value: function _adaptHits(typesenseHits) { - var _this2 = this; - var adaptedResult = []; - adaptedResult = typesenseHits.map(function (typesenseHit) { - var adaptedHit = _objectSpread({}, typesenseHit.document); - adaptedHit.objectID = typesenseHit.document.id; - adaptedHit._snippetResult = _this2._adaptHighlightResult(typesenseHit, "snippet"); - adaptedHit._highlightResult = _this2._adaptHighlightResult(typesenseHit, "value"); - adaptedHit._rawTypesenseHit = typesenseHit; + return MissingConfigurationError; +}(TypesenseError_1.default)); +exports["default"] = MissingConfigurationError; +//# sourceMappingURL=MissingConfigurationError.js.map - // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits - if (_this2.fullTypesenseResponse.conversation) { - adaptedHit._rawTypesenseConversation = _this2.fullTypesenseResponse.conversation; - } +/***/ }), - // Add metadata fields to result, if a field with that name doesn't already exist - ["text_match", "geo_distance_meters", "curated", "text_match_info", "hybrid_search_info", "vector_distance"].forEach(function (metadataField) { - if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) { - adaptedHit[metadataField] = typesenseHit[metadataField]; - } - }); - var geoLocationValue = adaptedHit[_this2.configuration.geoLocationField]; - if (geoLocationValue) { - adaptedHit._geoloc = { - lat: geoLocationValue[0], - lng: geoLocationValue[1] - }; - } - return adaptedHit; - }); - return adaptedResult; - } - }, { - key: "_adaptHighlightResult", - value: function _adaptHighlightResult(typesenseHit, snippetOrValue) { - var result = {}; +/***/ "./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js": +/*!****************************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js ***! + \****************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // If there is a highlight object available (as of v0.24.0), - // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above - // use that instead of the highlights array, since it supports highlights of nested fields - if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) { - this.adaptHighlightObject(typesenseHit, result, snippetOrValue); - } else { - this.adaptHighlightsArray(typesenseHit, result, snippetOrValue); - } - return result; - } - }, { - key: "isHighlightPost0240RCN32Format", - value: function isHighlightPost0240RCN32Format(highlight) { - return highlight.full == null && highlight.snippet == null; +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var ObjectAlreadyExists = /** @class */ (function (_super) { + __extends(ObjectAlreadyExists, _super); + function ObjectAlreadyExists() { + return _super !== null && _super.apply(this, arguments) || this; } - }, { - key: "adaptHighlightsArray", - value: function adaptHighlightsArray(typesenseHit, result, snippetOrValue) { - var _this3 = this; - // Algolia lists all searchable attributes in this key, even if there are no matches - // So do the same and then override highlights + return ObjectAlreadyExists; +}(TypesenseError_1.default)); +exports["default"] = ObjectAlreadyExists; +//# sourceMappingURL=ObjectAlreadyExists.js.map - Object.assign.apply(Object, [result].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(Object.entries(typesenseHit.document).map(function (_ref) { - var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2), - attribute = _ref2[0], - value = _ref2[1]; - return (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, attribute, { - value: value, - matchLevel: "none", - matchedWords: [] - }); - })))); - typesenseHit.highlights.forEach(function (highlight) { - result[highlight.field] = { - value: highlight[snippetOrValue] || highlight["".concat(snippetOrValue, "s")], - matchLevel: "full", - matchedWords: highlight.matched_tokens - }; - if (highlight.indices) { - result[highlight.field]["matchedIndices"] = highlight.indices; - } - }); +/***/ }), - // Now convert any values that have an array value - // Also, replace highlight tag - Object.entries(result).forEach(function (_ref4) { - var _ref5 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref4, 2), - k = _ref5[0], - v = _ref5[1]; - var attribute = k; - var value = v.value, - matchLevel = v.matchLevel, - matchedWords = v.matchedWords, - matchedIndices = v.matchedIndices; - if (value == null) { - result[attribute] = _this3._adaptHighlightNullValue(); - } else if (Array.isArray(value)) { - // Algolia lists all values of the key in highlights, even those that don't have any highlights - // So add all values of the array field, including highlights - result[attribute] = []; - typesenseHit.document[attribute].forEach(function (unhighlightedValueFromArray, index) { - if (matchedIndices && matchedIndices.includes(index)) { - result[attribute].push({ - value: _this3._adaptHighlightTag("".concat(value[matchedIndices.indexOf(index)]), _this3.instantsearchRequest.params.highlightPreTag, _this3.instantsearchRequest.params.highlightPostTag), - matchLevel: matchLevel, - matchedWords: matchedWords[index] - }); - } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(unhighlightedValueFromArray) === "object") { - // Handle arrays of objects - // Side note: Typesense does not support highlights for nested objects in this `highlights` array, - // so we pass in an empty object below - result[attribute].push(_this3._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue)); - } else { - result[attribute].push({ - value: "".concat(unhighlightedValueFromArray), - matchLevel: "none", - matchedWords: [] - }); - } - }); - } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(value) === "object") { - // Handle nested objects - // Side note: Typesense does not support highlights for nested objects in this `highlights` array, - // so we pass in an empty object below - result[attribute] = _this3._adaptHighlightInObjectValue(value, {}, snippetOrValue); - } else { - // Convert all values to strings - result[attribute].value = _this3._adaptHighlightTag("".concat(value), _this3.instantsearchRequest.params.highlightPreTag, _this3.instantsearchRequest.params.highlightPostTag); - } - }); - } - }, { - key: "adaptHighlightObject", - value: function adaptHighlightObject(typesenseHit, result, snippetOrValue) { - Object.assign(result, this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue)); - } - }, { - key: "_adaptHighlightInObjectValue", - value: function _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) { - var _this4 = this; - return Object.assign.apply(Object, [{}].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(Object.entries(objectValue).map(function (_ref6) { - var _ref7 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref6, 2), - attribute = _ref7[0], - value = _ref7[1]; - var adaptedValue; - if (value == null) { - adaptedValue = _this4._adaptHighlightNullValue(); - } else if (Array.isArray(value)) { - var _highlightObjectValue; - adaptedValue = _this4._adaptHighlightInArrayValue(value, (_highlightObjectValue = highlightObjectValue === null || highlightObjectValue === void 0 ? void 0 : highlightObjectValue[attribute]) !== null && _highlightObjectValue !== void 0 ? _highlightObjectValue : [], snippetOrValue); - } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(value) === "object") { - var _highlightObjectValue2; - adaptedValue = _this4._adaptHighlightInObjectValue(value, (_highlightObjectValue2 = highlightObjectValue === null || highlightObjectValue === void 0 ? void 0 : highlightObjectValue[attribute]) !== null && _highlightObjectValue2 !== void 0 ? _highlightObjectValue2 : {}, snippetOrValue); - } else { - adaptedValue = _this4._adaptHighlightInPrimitiveValue(value, highlightObjectValue === null || highlightObjectValue === void 0 ? void 0 : highlightObjectValue[attribute], snippetOrValue); - } - return (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, attribute, adaptedValue); - })))); - } - }, { - key: "_adaptHighlightInArrayValue", - value: function _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) { - var _this5 = this; - return arrayValue.map(function (value, index) { - var adaptedValue; - if (value == null) { - adaptedValue = _this5._adaptHighlightNullValue(); - } else if (Array.isArray(value)) { - var _highlightArrayValue$; - adaptedValue = _this5._adaptHighlightInArrayValue(value, (_highlightArrayValue$ = highlightArrayValue === null || highlightArrayValue === void 0 ? void 0 : highlightArrayValue[index]) !== null && _highlightArrayValue$ !== void 0 ? _highlightArrayValue$ : [], snippetOrValue); - } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(value) === "object") { - var _highlightArrayValue$2; - adaptedValue = _this5._adaptHighlightInObjectValue(value, (_highlightArrayValue$2 = highlightArrayValue === null || highlightArrayValue === void 0 ? void 0 : highlightArrayValue[index]) !== null && _highlightArrayValue$2 !== void 0 ? _highlightArrayValue$2 : {}, snippetOrValue); - } else { - adaptedValue = _this5._adaptHighlightInPrimitiveValue(value, highlightArrayValue === null || highlightArrayValue === void 0 ? void 0 : highlightArrayValue[index], snippetOrValue); - } - return adaptedValue; - }); - } - }, { - key: "_adaptHighlightInPrimitiveValue", - value: function _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) { - if (highlightPrimitiveValue != null) { - var _ref9, _highlightPrimitiveVa; - return { - value: this._adaptHighlightTag("".concat((_ref9 = (_highlightPrimitiveVa = highlightPrimitiveValue[snippetOrValue]) !== null && _highlightPrimitiveVa !== void 0 ? _highlightPrimitiveVa : highlightPrimitiveValue["highlight"]) !== null && _ref9 !== void 0 ? _ref9 : highlightPrimitiveValue["snippet"]), this.instantsearchRequest.params.highlightPreTag, this.instantsearchRequest.params.highlightPostTag), - matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? "full" : "none", - matchedWords: highlightPrimitiveValue.matched_tokens || [] - }; - } else { - return { - // Convert all values to strings - value: this._adaptHighlightTag("".concat(primitiveValue), this.instantsearchRequest.params.highlightPreTag, this.instantsearchRequest.params.highlightPostTag), - matchLevel: "none", - matchedWords: [] - }; - } +/***/ "./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js": +/*!***********************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js ***! + \***********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var ObjectNotFound = /** @class */ (function (_super) { + __extends(ObjectNotFound, _super); + function ObjectNotFound() { + return _super !== null && _super.apply(this, arguments) || this; } - }, { - key: "_adaptHighlightNullValue", - value: function _adaptHighlightNullValue() { - return { - value: "", - matchLevel: "none", - matchedWords: [] - }; + return ObjectNotFound; +}(TypesenseError_1.default)); +exports["default"] = ObjectNotFound; +//# sourceMappingURL=ObjectNotFound.js.map + +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js": +/*!****************************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js ***! + \****************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var ObjectUnprocessable = /** @class */ (function (_super) { + __extends(ObjectUnprocessable, _super); + function ObjectUnprocessable() { + return _super !== null && _super.apply(this, arguments) || this; } - }, { - key: "_adaptFacets", - value: function _adaptFacets(typesenseFacetCounts) { - var adaptedResult = {}; - typesenseFacetCounts.forEach(function (facet) { - Object.assign(adaptedResult, (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, facet.field_name, Object.assign.apply(Object, [{}].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(facet.counts.map(function (count) { - return (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, count.value, count.count); - })))))); - }); - return adaptedResult; + return ObjectUnprocessable; +}(TypesenseError_1.default)); +exports["default"] = ObjectUnprocessable; +//# sourceMappingURL=ObjectUnprocessable.js.map + +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js": +/*!*************************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js ***! + \*************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var RequestMalformed = /** @class */ (function (_super) { + __extends(RequestMalformed, _super); + function RequestMalformed() { + return _super !== null && _super.apply(this, arguments) || this; } - }, { - key: "_adaptFacetStats", - value: function _adaptFacetStats(typesenseFacetCounts) { - var adaptedResult = {}; - typesenseFacetCounts.forEach(function (facet) { - if (Object.keys(facet.stats).length > 0) { - Object.assign(adaptedResult, (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({}, facet.field_name, facet.stats)); - } - }); - return adaptedResult; + return RequestMalformed; +}(TypesenseError_1.default)); +exports["default"] = RequestMalformed; +//# sourceMappingURL=RequestMalformed.js.map + +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js": +/*!****************************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js ***! + \****************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var RequestUnauthorized = /** @class */ (function (_super) { + __extends(RequestUnauthorized, _super); + function RequestUnauthorized() { + return _super !== null && _super.apply(this, arguments) || this; } - }, { - key: "_adaptRenderingContent", - value: function _adaptRenderingContent(typesenseFacetCounts) { - var _adaptedResult$facetO; - var adaptedResult = Object.assign({}, this.configuration.renderingContent); + return RequestUnauthorized; +}(TypesenseError_1.default)); +exports["default"] = RequestUnauthorized; +//# sourceMappingURL=RequestUnauthorized.js.map - // Only set facet ordering if the user has not set one - if (((_adaptedResult$facetO = adaptedResult.facetOrdering) === null || _adaptedResult$facetO === void 0 || (_adaptedResult$facetO = _adaptedResult$facetO.facets) === null || _adaptedResult$facetO === void 0 ? void 0 : _adaptedResult$facetO.order) == null) { - adaptedResult.facetOrdering = adaptedResult.facetOrdering || {}; - adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {}; - adaptedResult.facetOrdering.facets.order = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(new Set(typesenseFacetCounts.map(function (fc) { - return fc["field_name"]; - }).concat(this.allTypesenseResults.map(function (r) { - return r.facet_counts || []; - }).flat().map(function (fc) { - return fc["field_name"]; - }).filter(function (f) { - return f; - })))); - } - return adaptedResult; +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/Errors/ServerError.js": +/*!********************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/ServerError.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var ServerError = /** @class */ (function (_super) { + __extends(ServerError, _super); + function ServerError() { + return _super !== null && _super.apply(this, arguments) || this; } - }, { - key: "adapt", - value: function adapt() { - var adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []); - var adaptedResult = _objectSpread({ - hits: this.typesenseResponse.grouped_hits ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits) : this._adaptHits(this.typesenseResponse.hits), - nbHits: this.typesenseResponse.found, - page: this.typesenseResponse.page - 1, - nbPages: this._adaptNumberOfPages(), - hitsPerPage: this.typesenseResponse.request_params.per_page, - facets: this._adaptFacets(this.typesenseResponse.facet_counts || []), - facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}), - query: this.typesenseResponse.request_params.q, - processingTimeMS: this.typesenseResponse.search_time_ms - }, Object.keys(adaptedRenderingContent).length > 0 ? { - renderingContent: adaptedRenderingContent - } : null); + return ServerError; +}(TypesenseError_1.default)); +exports["default"] = ServerError; +//# sourceMappingURL=ServerError.js.map - // If no results were found for the search, but there is still a conversation response, - // still send that as a hit so the conversation is accessible via Instantsearch - if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) { - adaptedResult.hits = [{ - _rawTypesenseConversation: this.fullTypesenseResponse.conversation - }]; - } +/***/ }), - // console.log(adaptedResult); - return adaptedResult; +/***/ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js": +/*!***********************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js ***! + \***********************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TypesenseError = /** @class */ (function (_super) { + __extends(TypesenseError, _super); + // Source: https://stackoverflow.com/a/58417721/123545 + function TypesenseError(message) { + var _newTarget = this.constructor; + var _this = _super.call(this, message) || this; + _this.name = _newTarget.name; + Object.setPrototypeOf(_this, _newTarget.prototype); + return _this; } - }]); -}(); -Object.assign(SearchResponseAdapter.prototype, _support_utils__WEBPACK_IMPORTED_MODULE_6__.utils); + return TypesenseError; +}(Error)); +exports["default"] = TypesenseError; +//# sourceMappingURL=TypesenseError.js.map /***/ }), -/***/ "./src/support/utils.js": -/*!******************************!*\ - !*** ./src/support/utils.js ***! - \******************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ "./node_modules/typesense/lib/Typesense/Errors/index.js": +/*!**************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Errors/index.js ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ utils: () => (/* binding */ utils) -/* harmony export */ }); -var utils = { - _adaptHighlightTag: function _adaptHighlightTag(value, highlightPreTag, highlightPostTag) { - return value.replace(new RegExp("", "g"), highlightPreTag || "").replace(new RegExp("", "g"), highlightPostTag || ""); - }, - _adaptNumberOfPages: function _adaptNumberOfPages() { - var result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page; - if (Number.isFinite(result)) { - return Math.ceil(result); - } else { - return 1; - } - } + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0; +var HTTPError_1 = __importDefault(__webpack_require__(/*! ./HTTPError */ "./node_modules/typesense/lib/Typesense/Errors/HTTPError.js")); +exports.HTTPError = HTTPError_1.default; +var MissingConfigurationError_1 = __importDefault(__webpack_require__(/*! ./MissingConfigurationError */ "./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js")); +exports.MissingConfigurationError = MissingConfigurationError_1.default; +var ObjectAlreadyExists_1 = __importDefault(__webpack_require__(/*! ./ObjectAlreadyExists */ "./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js")); +exports.ObjectAlreadyExists = ObjectAlreadyExists_1.default; +var ObjectNotFound_1 = __importDefault(__webpack_require__(/*! ./ObjectNotFound */ "./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js")); +exports.ObjectNotFound = ObjectNotFound_1.default; +var ObjectUnprocessable_1 = __importDefault(__webpack_require__(/*! ./ObjectUnprocessable */ "./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js")); +exports.ObjectUnprocessable = ObjectUnprocessable_1.default; +var RequestMalformed_1 = __importDefault(__webpack_require__(/*! ./RequestMalformed */ "./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js")); +exports.RequestMalformed = RequestMalformed_1.default; +var RequestUnauthorized_1 = __importDefault(__webpack_require__(/*! ./RequestUnauthorized */ "./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js")); +exports.RequestUnauthorized = RequestUnauthorized_1.default; +var ServerError_1 = __importDefault(__webpack_require__(/*! ./ServerError */ "./node_modules/typesense/lib/Typesense/Errors/ServerError.js")); +exports.ServerError = ServerError_1.default; +var ImportError_1 = __importDefault(__webpack_require__(/*! ./ImportError */ "./node_modules/typesense/lib/Typesense/Errors/ImportError.js")); +exports.ImportError = ImportError_1.default; +var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +exports.TypesenseError = TypesenseError_1.default; +//# sourceMappingURL=index.js.map /***/ }), -/***/ "./node_modules/loglevel/lib/loglevel.js": -/*!***********************************************!*\ - !*** ./node_modules/loglevel/lib/loglevel.js ***! - \***********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* -* loglevel - https://github.com/pimterry/loglevel -* -* Copyright (c) 2013 Tim Perry -* Licensed under the MIT license. -*/ -(function (root, definition) { - "use strict"; - if (true) { - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}(this, function () { - "use strict"; - - // Slightly dubious tricks to cut down minimized file size - var noop = function() {}; - var undefinedType = "undefined"; - var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && ( - /Trident\/|MSIE /.test(window.navigator.userAgent) - ); +/***/ "./node_modules/typesense/lib/Typesense/Health.js": +/*!********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Health.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports) { - var logMethods = [ - "trace", - "debug", - "info", - "warn", - "error" - ]; +"use strict"; - // Cross-browser bind equivalent that works at least back to IE6 - function bindMethod(obj, methodName) { - var method = obj[methodName]; - if (typeof method.bind === 'function') { - return method.bind(obj); - } else { - try { - return Function.prototype.bind.call(method, obj); - } catch (e) { - // Missing bind shim or IE8 + Modernizr, fallback to wrapping - return function() { - return Function.prototype.apply.apply(method, [obj, arguments]); - }; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; } - } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - - // Trace() doesn't print the message in IE, so for that case we need to wrap it - function traceForIE() { - if (console.log) { - if (console.log.apply) { - console.log.apply(console, arguments); - } else { - // In old IE, native console methods themselves don't have apply(). - Function.prototype.apply.apply(console.log, [console, arguments]); - } - } - if (console.trace) console.trace(); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/health"; +var Health = /** @class */ (function () { + function Health(apiCall) { + this.apiCall = apiCall; } + Health.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); + }); + }; + return Health; +}()); +exports["default"] = Health; +//# sourceMappingURL=Health.js.map - // Build the best logging method possible for this env - // Wherever possible we want to bind, not wrap, to preserve stack traces - function realMethod(methodName) { - if (methodName === 'debug') { - methodName = 'log'; - } +/***/ }), - if (typeof console === undefinedType) { - return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives - } else if (methodName === 'trace' && isIE) { - return traceForIE; - } else if (console[methodName] !== undefined) { - return bindMethod(console, methodName); - } else if (console.log !== undefined) { - return bindMethod(console, 'log'); - } else { - return noop; - } +/***/ "./node_modules/typesense/lib/Typesense/Key.js": +/*!*****************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Key.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Keys_1 = __importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); +var Key = /** @class */ (function () { + function Key(id, apiCall) { + this.id = id; + this.apiCall = apiCall; } + Key.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Key.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + Key.prototype.endpointPath = function () { + return "".concat(Keys_1.default.RESOURCEPATH, "/").concat(this.id); + }; + return Key; +}()); +exports["default"] = Key; +//# sourceMappingURL=Key.js.map - // These private functions always need `this` to be set properly +/***/ }), - function replaceLoggingMethods(level, loggerName) { - /*jshint validthis:true */ - for (var i = 0; i < logMethods.length; i++) { - var methodName = logMethods[i]; - this[methodName] = (i < level) ? - noop : - this.methodFactory(methodName, level, loggerName); - } +/***/ "./node_modules/typesense/lib/Typesense/Keys.js": +/*!******************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Keys.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // Define log.log as an alias for log.debug - this.log = this.debug; - } +"use strict"; - // In old IE versions, the console isn't present until you first open it. - // We build realMethod() replacements here that regenerate logging methods - function enableLoggingWhenConsoleArrives(methodName, level, loggerName) { - return function () { - if (typeof console !== undefinedType) { - replaceLoggingMethods.call(this, level, loggerName); - this[methodName].apply(this, arguments); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; } - }; + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - - // By default, we use closely bound real methods wherever possible, and - // otherwise we wait for a console to appear, and then try again. - function defaultMethodFactory(methodName, level, loggerName) { - /*jshint validthis:true */ - return realMethod(methodName) || - enableLoggingWhenConsoleArrives.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var crypto_1 = __webpack_require__(/*! crypto */ "?6884"); +var RESOURCEPATH = "/keys"; +var Keys = /** @class */ (function () { + function Keys(apiCall) { + this.apiCall = apiCall; + this.apiCall = apiCall; } + Keys.prototype.create = function (params) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)]; + }); + }); + }; + Keys.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); + }); + }; + Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) { + // Note: only a key generated with the `documents:search` action will be + // accepted by the server, when usined with the search endpoint. + var paramsJSON = JSON.stringify(parameters); + var digest = Buffer.from((0, crypto_1.createHmac)("sha256", searchKey).update(paramsJSON).digest("base64")); + var keyPrefix = searchKey.substr(0, 4); + var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); + return Buffer.from(rawScopedKey).toString("base64"); + }; + Object.defineProperty(Keys, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Keys; +}()); +exports["default"] = Keys; +//# sourceMappingURL=Keys.js.map - function Logger(name, defaultLevel, factory) { - var self = this; - var currentLevel; - defaultLevel = defaultLevel == null ? "WARN" : defaultLevel; - - var storageKey = "loglevel"; - if (typeof name === "string") { - storageKey += ":" + name; - } else if (typeof name === "symbol") { - storageKey = undefined; - } - - function persistLevelIfPossible(levelNum) { - var levelName = (logMethods[levelNum] || 'silent').toUpperCase(); - - if (typeof window === undefinedType || !storageKey) return; - - // Use localStorage if available - try { - window.localStorage[storageKey] = levelName; - return; - } catch (ignore) {} - - // Use session cookie as fallback - try { - window.document.cookie = - encodeURIComponent(storageKey) + "=" + levelName + ";"; - } catch (ignore) {} - } - - function getPersistedLevel() { - var storedLevel; - - if (typeof window === undefinedType || !storageKey) return; +/***/ }), - try { - storedLevel = window.localStorage[storageKey]; - } catch (ignore) {} +/***/ "./node_modules/typesense/lib/Typesense/Metrics.js": +/*!*********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Metrics.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { - // Fallback to cookies if local storage gives us nothing - if (typeof storedLevel === undefinedType) { - try { - var cookie = window.document.cookie; - var location = cookie.indexOf( - encodeURIComponent(storageKey) + "="); - if (location !== -1) { - storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1]; - } - } catch (ignore) {} - } +"use strict"; - // If the stored level is not valid, treat it as if nothing was stored. - if (self.levels[storedLevel] === undefined) { - storedLevel = undefined; - } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/metrics.json"; +var Metrics = /** @class */ (function () { + function Metrics(apiCall) { + this.apiCall = apiCall; + } + Metrics.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); + }); + }; + return Metrics; +}()); +exports["default"] = Metrics; +//# sourceMappingURL=Metrics.js.map - return storedLevel; - } +/***/ }), - function clearPersistedLevel() { - if (typeof window === undefinedType || !storageKey) return; +/***/ "./node_modules/typesense/lib/Typesense/MultiSearch.js": +/*!*************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/MultiSearch.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - // Use localStorage if available - try { - window.localStorage.removeItem(storageKey); - return; - } catch (ignore) {} +"use strict"; - // Use session cookie as fallback - try { - window.document.cookie = - encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; - } catch (ignore) {} - } +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RequestWithCache_1 = __importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); +var RESOURCEPATH = "/multi_search"; +var MultiSearch = /** @class */ (function () { + function MultiSearch(apiCall, configuration, useTextContentType) { + if (useTextContentType === void 0) { useTextContentType = false; } + this.apiCall = apiCall; + this.configuration = configuration; + this.useTextContentType = useTextContentType; + this.requestWithCache = new RequestWithCache_1.default(); + } + MultiSearch.prototype.clearCache = function () { + this.requestWithCache.clearCache(); + }; + MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) { + if (commonParams === void 0) { commonParams = {}; } + var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration + .cacheSearchResultsForSeconds : _c; + return __awaiter(this, void 0, void 0, function () { + var additionalHeaders, additionalQueryParams, queryParams; + return __generator(this, function (_d) { + additionalHeaders = {}; + if (this.useTextContentType) { + additionalHeaders["content-type"] = "text/plain"; + } + additionalQueryParams = {}; + if (this.configuration.useServerSideSearchCache === true) { + additionalQueryParams["use_cache"] = true; + } + queryParams = Object.assign({}, commonParams, additionalQueryParams); + return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })]; + }); + }); + }; + return MultiSearch; +}()); +exports["default"] = MultiSearch; +//# sourceMappingURL=MultiSearch.js.map - /* - * - * Public logger API - see https://github.com/pimterry/loglevel for details - * - */ +/***/ }), - self.name = name; +/***/ "./node_modules/typesense/lib/Typesense/Operations.js": +/*!************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Operations.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports) { - self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, - "ERROR": 4, "SILENT": 5}; +"use strict"; - self.methodFactory = factory || defaultMethodFactory; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var RESOURCEPATH = "/operations"; +var Operations = /** @class */ (function () { + function Operations(apiCall) { + this.apiCall = apiCall; + } + Operations.prototype.perform = function (operationName, queryParameters) { + if (queryParameters === void 0) { queryParameters = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.post("".concat(RESOURCEPATH, "/").concat(operationName), {}, queryParameters)]; + }); + }); + }; + return Operations; +}()); +exports["default"] = Operations; +//# sourceMappingURL=Operations.js.map - self.getLevel = function () { - return currentLevel; - }; +/***/ }), - self.setLevel = function (level, persist) { - if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) { - level = self.levels[level.toUpperCase()]; - } - if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) { - currentLevel = level; - if (persist !== false) { // defaults to true - persistLevelIfPossible(level); - } - replaceLoggingMethods.call(self, level, name); - if (typeof console === undefinedType && level < self.levels.SILENT) { - return "No console available for logging"; - } - } else { - throw "log.setLevel() called with invalid level: " + level; - } - }; +/***/ "./node_modules/typesense/lib/Typesense/Override.js": +/*!**********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Override.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - self.setDefaultLevel = function (level) { - defaultLevel = level; - if (!getPersistedLevel()) { - self.setLevel(level, false); - } - }; +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Overrides_1 = __importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); +var Override = /** @class */ (function () { + function Override(collectionName, overrideId, apiCall) { + this.collectionName = collectionName; + this.overrideId = overrideId; + this.apiCall = apiCall; + } + Override.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Override.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + Override.prototype.endpointPath = function () { + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, "/").concat(this.overrideId); + }; + return Override; +}()); +exports["default"] = Override; +//# sourceMappingURL=Override.js.map - self.resetLevel = function () { - self.setLevel(defaultLevel, false); - clearPersistedLevel(); - }; +/***/ }), - self.enableAll = function(persist) { - self.setLevel(self.levels.TRACE, persist); - }; +/***/ "./node_modules/typesense/lib/Typesense/Overrides.js": +/*!***********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Overrides.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - self.disableAll = function(persist) { - self.setLevel(self.levels.SILENT, persist); - }; +"use strict"; - // Initialize with the right level - var initialLevel = getPersistedLevel(); - if (initialLevel == null) { - initialLevel = defaultLevel; - } - self.setLevel(initialLevel, false); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var RESOURCEPATH = "/overrides"; +var Overrides = /** @class */ (function () { + function Overrides(collectionName, apiCall) { + this.collectionName = collectionName; + this.apiCall = apiCall; } + Overrides.prototype.upsert = function (overrideId, params) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)]; + }); + }); + }; + Overrides.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Overrides.prototype.endpointPath = function (operation) { + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + }; + Object.defineProperty(Overrides, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Overrides; +}()); +exports["default"] = Overrides; +//# sourceMappingURL=Overrides.js.map - /* - * - * Top-level API - * - */ +/***/ }), - var defaultLogger = new Logger(); +/***/ "./node_modules/typesense/lib/Typesense/Preset.js": +/*!********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Preset.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - var _loggersByName = {}; - defaultLogger.getLogger = function getLogger(name) { - if ((typeof name !== "symbol" && typeof name !== "string") || name === "") { - throw new TypeError("You must supply a name when creating a logger."); - } +"use strict"; - var logger = _loggersByName[name]; - if (!logger) { - logger = _loggersByName[name] = new Logger( - name, defaultLogger.getLevel(), defaultLogger.methodFactory); - } - return logger; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Presets_1 = __importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); +var Preset = /** @class */ (function () { + function Preset(presetId, apiCall) { + this.presetId = presetId; + this.apiCall = apiCall; + } + Preset.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); }; - - // Grab the current global log variable in case of overwrite - var _log = (typeof window !== undefinedType) ? window.log : undefined; - defaultLogger.noConflict = function() { - if (typeof window !== undefinedType && - window.log === defaultLogger) { - window.log = _log; - } - - return defaultLogger; + Preset.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); }; - - defaultLogger.getLoggers = function getLoggers() { - return _loggersByName; + Preset.prototype.endpointPath = function () { + return "".concat(Presets_1.default.RESOURCEPATH, "/").concat(this.presetId); }; - - // ES6 default export, for compatibility - defaultLogger['default'] = defaultLogger; - - return defaultLogger; -})); - + return Preset; +}()); +exports["default"] = Preset; +//# sourceMappingURL=Preset.js.map /***/ }), -/***/ "./node_modules/typesense/lib/Typesense.js": -/*!*************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense.js ***! - \*************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "./node_modules/typesense/lib/Typesense/Presets.js": +/*!*********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Presets.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports) { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Errors = exports.SearchClient = exports.Client = void 0; -var Client_1 = __importDefault(__webpack_require__(/*! ./Typesense/Client */ "./node_modules/typesense/lib/Typesense/Client.js")); -exports.Client = Client_1.default; -var SearchClient_1 = __importDefault(__webpack_require__(/*! ./Typesense/SearchClient */ "./node_modules/typesense/lib/Typesense/SearchClient.js")); -exports.SearchClient = SearchClient_1.default; -var Errors = __importStar(__webpack_require__(/*! ./Typesense/Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js")); -exports.Errors = Errors; -exports["default"] = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors }; -//# sourceMappingURL=Typesense.js.map +var RESOURCEPATH = "/presets"; +var Presets = /** @class */ (function () { + function Presets(apiCall) { + this.apiCall = apiCall; + } + Presets.prototype.upsert = function (presetId, params) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)]; + }); + }); + }; + Presets.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Presets.prototype.endpointPath = function (operation) { + return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + }; + Object.defineProperty(Presets, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Presets; +}()); +exports["default"] = Presets; +//# sourceMappingURL=Presets.js.map /***/ }), -/***/ "./node_modules/typesense/lib/Typesense/Alias.js": -/*!*******************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Alias.js ***! - \*******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "./node_modules/typesense/lib/Typesense/RequestWithCache.js": +/*!******************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/RequestWithCache.js ***! + \******************************************************************/ +/***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -3655,7 +4704,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -3676,45 +4725,190 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Aliases_1 = __importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); -var Alias = /** @class */ (function () { - function Alias(name, apiCall) { - this.name = name; - this.apiCall = apiCall; +var defaultCacheResponseForSeconds = 2 * 60; +var defaultMaxSize = 100; +var RequestWithCache = /** @class */ (function () { + function RequestWithCache() { + this.responseCache = new Map(); + this.responsePromiseCache = new Map(); } - Alias.prototype.retrieve = function () { + RequestWithCache.prototype.clearCache = function () { + this.responseCache = new Map(); + this.responsePromiseCache = new Map(); + }; + // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way + RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) { return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b; + isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0; + if (isCacheDisabled) { + return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))]; + } + requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments); + cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON); + now = Date.now(); + if (cacheEntry) { + isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000; + if (isEntryValid) { + this.responseCache.delete(requestFunctionArgumentsJSON); + this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry); + return [2 /*return*/, Promise.resolve(cacheEntry.response)]; + } + else { + this.responseCache.delete(requestFunctionArgumentsJSON); + } + } + cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON); + if (cachePromiseEntry) { + isEntryValid = now - cachePromiseEntry.requestTimestamp < + cacheResponseForSeconds * 1000; + if (isEntryValid) { + this.responsePromiseCache.delete(requestFunctionArgumentsJSON); + this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry); + return [2 /*return*/, cachePromiseEntry.responsePromise]; + } + else { + this.responsePromiseCache.delete(requestFunctionArgumentsJSON); + } + } + responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false)); + this.responsePromiseCache.set(requestFunctionArgumentsJSON, { + requestTimestamp: now, + responsePromise: responsePromise, + }); + return [4 /*yield*/, responsePromise]; + case 1: + response = _c.sent(); + this.responseCache.set(requestFunctionArgumentsJSON, { + requestTimestamp: now, + response: response, + }); + isCacheOverMaxSize = this.responseCache.size > maxSize; + if (isCacheOverMaxSize) { + oldestEntry = this.responseCache.keys().next().value; + this.responseCache.delete(oldestEntry); + } + isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize; + if (isResponsePromiseCacheOverMaxSize) { + oldestEntry = this.responsePromiseCache.keys().next().value; + this.responsePromiseCache.delete(oldestEntry); + } + return [2 /*return*/, response]; + } }); }); }; - Alias.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; - }); + return RequestWithCache; +}()); +exports["default"] = RequestWithCache; +//# sourceMappingURL=RequestWithCache.js.map + +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/SearchClient.js": +/*!**************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/SearchClient.js ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Configuration_1 = __importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); +var ApiCall_1 = __importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); +var MultiSearch_1 = __importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); +var SearchOnlyCollection_1 = __webpack_require__(/*! ./SearchOnlyCollection */ "./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js"); +var SearchClient = /** @class */ (function () { + function SearchClient(options) { + var _a; + options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true; + if (options.sendApiKeyAsQueryParam === true && + (options.apiKey || "").length > 2000) { + console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."); + options.sendApiKeyAsQueryParam = false; + } + this.configuration = new Configuration_1.default(options); + this.apiCall = new ApiCall_1.default(this.configuration); + this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true); + this.individualCollections = {}; + } + SearchClient.prototype.clearCache = function () { + this.multiSearch.clearCache(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars + Object.entries(this.individualCollections).forEach(function (_a) { + var _ = _a[0], collection = _a[1]; + collection.documents().clearCache(); }); }; - Alias.prototype.endpointPath = function () { - return "".concat(Aliases_1.default.RESOURCEPATH, "/").concat(this.name); + SearchClient.prototype.collections = function (collectionName) { + if (!collectionName) { + throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to " + + "be searched must be specified. Use Typesense.Client if you need to access the collection object."); + } + else { + if (this.individualCollections[collectionName] === undefined) { + this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration); + } + return this.individualCollections[collectionName]; + } + }; + return SearchClient; +}()); +exports["default"] = SearchClient; +//# sourceMappingURL=SearchClient.js.map + +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js": +/*!**********************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SearchOnlyCollection = void 0; +var SearchOnlyDocuments_1 = __webpack_require__(/*! ./SearchOnlyDocuments */ "./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js"); +var SearchOnlyCollection = /** @class */ (function () { + function SearchOnlyCollection(name, apiCall, configuration) { + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration); + } + SearchOnlyCollection.prototype.documents = function () { + return this._documents; }; - return Alias; + return SearchOnlyCollection; }()); -exports["default"] = Alias; -//# sourceMappingURL=Alias.js.map +exports.SearchOnlyCollection = SearchOnlyCollection; +//# sourceMappingURL=SearchOnlyCollection.js.map /***/ }), -/***/ "./node_modules/typesense/lib/Typesense/Aliases.js": -/*!*********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Aliases.js ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ "./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js": +/*!*********************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js ***! + \*********************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -3733,7 +4927,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -3754,94 +4948,67 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/aliases"; -var Aliases = /** @class */ (function () { - function Aliases(apiCall) { +exports.SearchOnlyDocuments = void 0; +var RequestWithCache_1 = __importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var RESOURCEPATH = "/documents"; +var SearchOnlyDocuments = /** @class */ (function () { + function SearchOnlyDocuments(collectionName, apiCall, configuration) { + this.collectionName = collectionName; this.apiCall = apiCall; + this.configuration = configuration; + this.requestWithCache = new RequestWithCache_1.default(); } - Aliases.prototype.upsert = function (name, mapping) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)]; - }); - }); + SearchOnlyDocuments.prototype.clearCache = function () { + this.requestWithCache.clearCache(); }; - Aliases.prototype.retrieve = function () { + SearchOnlyDocuments.prototype.search = function (searchParameters, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration + .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d; return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + var additionalQueryParams, key, queryParams; + return __generator(this, function (_e) { + additionalQueryParams = {}; + if (this.configuration.useServerSideSearchCache === true) { + additionalQueryParams["use_cache"] = true; + } + for (key in searchParameters) { + if (Array.isArray(searchParameters[key])) { + additionalQueryParams[key] = searchParameters[key].join(","); + } + } + queryParams = Object.assign({}, searchParameters, additionalQueryParams); + return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath("search"), queryParams, { abortSignal: abortSignal }], { + cacheResponseForSeconds: cacheSearchResultsForSeconds, + })]; }); }); }; - Aliases.prototype.endpointPath = function (aliasName) { - return "".concat(Aliases.RESOURCEPATH, "/").concat(aliasName); - }; - Object.defineProperty(Aliases, "RESOURCEPATH", { - get: function () { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Aliases; -}()); -exports["default"] = Aliases; -//# sourceMappingURL=Aliases.js.map - -/***/ }), - -/***/ "./node_modules/typesense/lib/Typesense/Analytics.js": -/*!***********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Analytics.js ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var AnalyticsRules_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); -var AnalyticsRule_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRule */ "./node_modules/typesense/lib/Typesense/AnalyticsRule.js")); -var RESOURCEPATH = "/analytics"; -var Analytics = /** @class */ (function () { - function Analytics(apiCall) { - this.apiCall = apiCall; - this.individualAnalyticsRules = {}; - this.apiCall = apiCall; - this._analyticsRules = new AnalyticsRules_1.default(this.apiCall); - } - Analytics.prototype.rules = function (id) { - if (id === undefined) { - return this._analyticsRules; - } - else { - if (this.individualAnalyticsRules[id] === undefined) { - this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall); - } - return this.individualAnalyticsRules[id]; - } + SearchOnlyDocuments.prototype.endpointPath = function (operation) { + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); }; - Object.defineProperty(Analytics, "RESOURCEPATH", { + Object.defineProperty(SearchOnlyDocuments, "RESOURCEPATH", { get: function () { return RESOURCEPATH; }, enumerable: false, configurable: true }); - return Analytics; + return SearchOnlyDocuments; }()); -exports["default"] = Analytics; -//# sourceMappingURL=Analytics.js.map +exports.SearchOnlyDocuments = SearchOnlyDocuments; +//# sourceMappingURL=SearchOnlyDocuments.js.map /***/ }), -/***/ "./node_modules/typesense/lib/Typesense/AnalyticsRule.js": -/*!***************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/AnalyticsRule.js ***! - \***************************************************************/ +/***/ "./node_modules/typesense/lib/Typesense/Stopword.js": +/*!**********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Stopword.js ***! + \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -3861,7 +5028,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -3886,40 +5053,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var AnalyticsRules_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); -var AnalyticsRule = /** @class */ (function () { - function AnalyticsRule(name, apiCall) { - this.name = name; +var Stopwords_1 = __importDefault(__webpack_require__(/*! ./Stopwords */ "./node_modules/typesense/lib/Typesense/Stopwords.js")); +var Stopword = /** @class */ (function () { + function Stopword(stopwordId, apiCall) { + this.stopwordId = stopwordId; this.apiCall = apiCall; } - AnalyticsRule.prototype.retrieve = function () { + Stopword.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; - AnalyticsRule.prototype.delete = function () { + Stopword.prototype.delete = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; - AnalyticsRule.prototype.endpointPath = function () { - return "".concat(AnalyticsRules_1.default.RESOURCEPATH, "/").concat(this.name); + Stopword.prototype.endpointPath = function () { + return "".concat(Stopwords_1.default.RESOURCEPATH, "/").concat(this.stopwordId); }; - return AnalyticsRule; + return Stopword; }()); -exports["default"] = AnalyticsRule; -//# sourceMappingURL=AnalyticsRule.js.map +exports["default"] = Stopword; +//# sourceMappingURL=Stopword.js.map /***/ }), -/***/ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js": -/*!****************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/AnalyticsRules.js ***! - \****************************************************************/ +/***/ "./node_modules/typesense/lib/Typesense/Stopwords.js": +/*!***********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Stopwords.js ***! + \***********************************************************/ /***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -3939,7 +5106,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -3961,46 +5128,45 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/analytics/rules"; -var AnalyticsRules = /** @class */ (function () { - function AnalyticsRules(apiCall) { - this.apiCall = apiCall; +var RESOURCEPATH = "/stopwords"; +var Stopwords = /** @class */ (function () { + function Stopwords(apiCall) { this.apiCall = apiCall; } - AnalyticsRules.prototype.upsert = function (name, params) { + Stopwords.prototype.upsert = function (stopwordId, params) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)]; + return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)]; }); }); }; - AnalyticsRules.prototype.retrieve = function () { + Stopwords.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; - AnalyticsRules.prototype.endpointPath = function (operation) { - return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + Stopwords.prototype.endpointPath = function (operation) { + return "".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); }; - Object.defineProperty(AnalyticsRules, "RESOURCEPATH", { + Object.defineProperty(Stopwords, "RESOURCEPATH", { get: function () { return RESOURCEPATH; }, enumerable: false, configurable: true }); - return AnalyticsRules; + return Stopwords; }()); -exports["default"] = AnalyticsRules; -//# sourceMappingURL=AnalyticsRules.js.map +exports["default"] = Stopwords; +//# sourceMappingURL=Stopwords.js.map /***/ }), -/***/ "./node_modules/typesense/lib/Typesense/ApiCall.js": +/***/ "./node_modules/typesense/lib/Typesense/Synonym.js": /*!*********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/ApiCall.js ***! + !*** ./node_modules/typesense/lib/Typesense/Synonym.js ***! \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { @@ -4021,7 +5187,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -4046,3274 +5212,3757 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var axios_1 = __importDefault(__webpack_require__(/*! axios */ "./node_modules/axios/index.js")); -var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./Errors/TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; -var HEALTHY = true; -var UNHEALTHY = false; -var ApiCall = /** @class */ (function () { - function ApiCall(configuration) { - this.configuration = configuration; - this.apiKey = this.configuration.apiKey; - this.nodes = - this.configuration.nodes == null - ? this.configuration.nodes - : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes - this.nearestNode = - this.configuration.nearestNode == null - ? this.configuration.nearestNode - : JSON.parse(JSON.stringify(this.configuration.nearestNode)); - this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds; - this.healthcheckIntervalSeconds = - this.configuration.healthcheckIntervalSeconds; - this.numRetriesPerRequest = this.configuration.numRetries; - this.retryIntervalSeconds = this.configuration.retryIntervalSeconds; - this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam; - this.additionalUserHeaders = this.configuration.additionalHeaders; - this.logger = this.configuration.logger; - this.initializeMetadataForNodes(); - this.currentNodeIndex = -1; +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Synonyms_1 = __importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); +var Synonym = /** @class */ (function () { + function Synonym(collectionName, synonymId, apiCall) { + this.collectionName = collectionName; + this.synonymId = synonymId; + this.apiCall = apiCall; + } + Synonym.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; + }); + }); + }; + Synonym.prototype.delete = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + }); + }); + }; + Synonym.prototype.endpointPath = function () { + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, "/").concat(this.synonymId); + }; + return Synonym; +}()); +exports["default"] = Synonym; +//# sourceMappingURL=Synonym.js.map + +/***/ }), + +/***/ "./node_modules/typesense/lib/Typesense/Synonyms.js": +/*!**********************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Synonyms.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } - ApiCall.prototype.get = function (endpoint, queryParameters, _a) { - if (queryParameters === void 0) { queryParameters = {}; } - var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d; - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_e) { - return [2 /*return*/, this.performRequest("get", endpoint, { - queryParameters: queryParameters, - abortSignal: abortSignal, - responseType: responseType, - })]; - }); - }); - }; - ApiCall.prototype.delete = function (endpoint, queryParameters) { - if (queryParameters === void 0) { queryParameters = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.performRequest("delete", endpoint, { queryParameters: queryParameters })]; - }); - }); - }; - ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) { - if (bodyParameters === void 0) { bodyParameters = {}; } - if (queryParameters === void 0) { queryParameters = {}; } - if (additionalHeaders === void 0) { additionalHeaders = {}; } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var RESOURCEPATH = "/synonyms"; +var Synonyms = /** @class */ (function () { + function Synonyms(collectionName, apiCall) { + this.collectionName = collectionName; + this.apiCall = apiCall; + } + Synonyms.prototype.upsert = function (synonymId, params) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, this.performRequest("post", endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters, - additionalHeaders: additionalHeaders, - })]; + return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)]; }); }); }; - ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) { - if (bodyParameters === void 0) { bodyParameters = {}; } - if (queryParameters === void 0) { queryParameters = {}; } + Synonyms.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, this.performRequest("put", endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters, - })]; + return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; - ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) { - if (bodyParameters === void 0) { bodyParameters = {}; } - if (queryParameters === void 0) { queryParameters = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.performRequest("patch", endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters, - })]; - }); - }); + Synonyms.prototype.endpointPath = function (operation) { + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); }; - ApiCall.prototype.performRequest = function (requestType, endpoint, _a) { - var _b, _c, _d; - var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k; - return __awaiter(this, void 0, void 0, function () { - var requestNumber, lastException, _loop_1, this_1, numTries, state_1; - return __generator(this, function (_l) { - switch (_l.label) { - case 0: - this.configuration.validate(); - requestNumber = Date.now(); - this.logger.debug("Request #".concat(requestNumber, ": Performing ").concat(requestType.toUpperCase(), " request: ").concat(endpoint)); - _loop_1 = function (numTries) { - var node, abortListener, requestOptions, cancelToken, source_1, response, error_1; - return __generator(this, function (_m) { - switch (_m.label) { - case 0: - node = this_1.getNextNode(requestNumber); - this_1.logger.debug("Request #".concat(requestNumber, ": Attempting ").concat(requestType.toUpperCase(), " request Try #").concat(numTries, " to Node ").concat(node.index)); - if (abortSignal && abortSignal.aborted) { - return [2 /*return*/, { value: Promise.reject(new Error("Request aborted by caller.")) }]; - } - abortListener = void 0; - _m.label = 1; - case 1: - _m.trys.push([1, 3, 5, 6]); - requestOptions = { - method: requestType, - url: this_1.uriFor(endpoint, node), - headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders), - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: responseType, - validateStatus: function (status) { - /* Override default validateStatus, which only considers 2xx a success. - In our case, if the server returns any HTTP code, we will handle it below. - We do this to be able to raise custom errors based on response code. - */ - return status > 0; - }, - transformResponse: [ - function (data, headers) { - var transformedData = data; - if (headers !== undefined && - typeof data === "string" && - headers["content-type"] && - headers["content-type"].startsWith("application/json")) { - transformedData = JSON.parse(data); - } - return transformedData; - }, - ], - }; - if (skipConnectionTimeout !== true) { - requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000; - } - if (queryParameters && Object.keys(queryParameters).length !== 0) { - requestOptions.params = queryParameters; - } - if (this_1.sendApiKeyAsQueryParam) { - requestOptions.params = requestOptions.params || {}; - requestOptions.params["x-typesense-api-key"] = this_1.apiKey; - } - if (bodyParameters && - ((typeof bodyParameters === "string" && - bodyParameters.length !== 0) || - (typeof bodyParameters === "object" && - Object.keys(bodyParameters).length !== 0))) { - requestOptions.data = bodyParameters; - } - // Translate from user-provided AbortController to the Axios request cancel mechanism. - if (abortSignal) { - cancelToken = axios_1.default.CancelToken; - source_1 = cancelToken.source(); - abortListener = function () { return source_1.cancel(); }; - abortSignal.addEventListener("abort", abortListener); - requestOptions.cancelToken = source_1.token; - } - return [4 /*yield*/, (0, axios_1.default)(requestOptions)]; - case 2: - response = _m.sent(); - if (response.status >= 1 && response.status <= 499) { - // Treat any status code > 0 and < 500 to be an indication that node is healthy - // We exclude 0 since some clients return 0 when request fails - this_1.setNodeHealthcheck(node, HEALTHY); - } - this_1.logger.debug("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " was made. Response Code was ").concat(response.status, ".")); - if (response.status >= 200 && response.status < 300) { - return [2 /*return*/, { value: Promise.resolve(response.data) }]; - } - else if (response.status < 500) { - return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }]; - } - else { - // Retry all other HTTP errors (HTTPStatus > 500) - // This will get caught by the catch block below - throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message); - } - return [3 /*break*/, 6]; - case 3: - error_1 = _m.sent(); - // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts - this_1.setNodeHealthcheck(node, UNHEALTHY); - lastException = error_1; - this_1.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(error_1.code, " ").concat(error_1.message).concat(error_1.response == null - ? "" - : " - " + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), "\"")); - // this.logger.debug(error.stack) - this_1.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(this_1.retryIntervalSeconds, "s and then retrying request...")); - return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)]; - case 4: - _m.sent(); - return [3 /*break*/, 6]; - case 5: - if (abortSignal && abortListener) { - abortSignal.removeEventListener("abort", abortListener); - } - return [7 /*endfinally*/]; - case 6: return [2 /*return*/]; - } - }); - }; - this_1 = this; - numTries = 1; - _l.label = 1; - case 1: - if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4]; - return [5 /*yield**/, _loop_1(numTries)]; - case 2: - state_1 = _l.sent(); - if (typeof state_1 === "object") - return [2 /*return*/, state_1.value]; - _l.label = 3; - case 3: - numTries++; - return [3 /*break*/, 1]; - case 4: - this.logger.debug("Request #".concat(requestNumber, ": No retries left. Raising last error")); - return [2 /*return*/, Promise.reject(lastException)]; - } - }); - }); + Object.defineProperty(Synonyms, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Synonyms; +}()); +exports["default"] = Synonyms; +//# sourceMappingURL=Synonyms.js.map + +/***/ }), + +/***/ "?6884": +/*!************************!*\ + !*** crypto (ignored) ***! + \************************/ +/***/ (() => { + +/* (ignored) */ + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/regeneratorRuntime.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! + \*******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var _typeof = (__webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/typeof.js")["default"]); +function _regeneratorRuntime() { + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { + return e; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + var t, + e = {}, + r = Object.prototype, + n = r.hasOwnProperty, + o = Object.defineProperty || function (t, e, r) { + t[e] = r.value; + }, + i = "function" == typeof Symbol ? Symbol : {}, + a = i.iterator || "@@iterator", + c = i.asyncIterator || "@@asyncIterator", + u = i.toStringTag || "@@toStringTag"; + function define(t, e, r) { + return Object.defineProperty(t, e, { + value: r, + enumerable: !0, + configurable: !0, + writable: !0 + }), t[e]; + } + try { + define({}, ""); + } catch (t) { + define = function define(t, e, r) { + return t[e] = r; }; - // Attempts to find the next healthy node, looping through the list of nodes once. - // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy - // so we can try the request for good measure, in case that node has become healthy since - ApiCall.prototype.getNextNode = function (requestNumber) { - if (requestNumber === void 0) { requestNumber = 0; } - // Check if nearestNode is set and is healthy, if so return it - if (this.nearestNode != null) { - this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? "Healthy" : "Unhealthy")); - if (this.nearestNode.isHealthy === true || - this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) { - this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(this.nearestNode.index)); - return this.nearestNode; - } - this.logger.debug("Request #".concat(requestNumber, ": Falling back to individual nodes")); - } - // Fallback to nodes as usual - this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: ").concat(this.nodes - .map(function (node) { - return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? "Healthy" : "Unhealthy"); - }) - .join(" || "))); - var candidateNode = this.nodes[0]; - for (var i = 0; i <= this.nodes.length; i++) { - this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; - candidateNode = this.nodes[this.currentNodeIndex]; - if (candidateNode.isHealthy === true || - this.nodeDueForHealthcheck(candidateNode, requestNumber)) { - this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(candidateNode.index)); - return candidateNode; - } + } + function wrap(t, e, r, n) { + var i = e && e.prototype instanceof Generator ? e : Generator, + a = Object.create(i.prototype), + c = new Context(n || []); + return o(a, "_invoke", { + value: makeInvokeMethod(t, r, c) + }), a; + } + function tryCatch(t, e, r) { + try { + return { + type: "normal", + arg: t.call(e, r) + }; + } catch (t) { + return { + type: "throw", + arg: t + }; + } + } + e.wrap = wrap; + var h = "suspendedStart", + l = "suspendedYield", + f = "executing", + s = "completed", + y = {}; + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + var p = {}; + define(p, a, function () { + return this; + }); + var d = Object.getPrototypeOf, + v = d && d(d(values([]))); + v && v !== r && n.call(v, a) && (p = v); + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); + function defineIteratorMethods(t) { + ["next", "throw", "return"].forEach(function (e) { + define(t, e, function (t) { + return this._invoke(e, t); + }); + }); + } + function AsyncIterator(t, e) { + function invoke(r, o, i, a) { + var c = tryCatch(t[r], t, o); + if ("throw" !== c.type) { + var u = c.arg, + h = u.value; + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { + invoke("next", t, i, a); + }, function (t) { + invoke("throw", t, i, a); + }) : e.resolve(h).then(function (t) { + u.value = t, i(u); + }, function (t) { + return invoke("throw", t, i, a); + }); + } + a(c.arg); + } + var r; + o(this, "_invoke", { + value: function value(t, n) { + function callInvokeWithMethodAndArg() { + return new e(function (e, r) { + invoke(t, n, e, r); + }); } - // None of the nodes are marked healthy, but some of them could have become healthy since last health check. - // So we will just return the next node. - this.logger.debug("Request #".concat(requestNumber, ": No healthy nodes were found. Returning the next node, Node ").concat(candidateNode.index)); - return candidateNode; - }; - ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) { - if (requestNumber === void 0) { requestNumber = 0; } - var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp > - this.healthcheckIntervalSeconds * 1000; - if (isDueForHealthcheck) { - this.logger.debug("Request #".concat(requestNumber, ": Node ").concat(node.index, " has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds, ". Adding it back into rotation.")); + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } + }); + } + function makeInvokeMethod(e, r, n) { + var o = h; + return function (i, a) { + if (o === f) throw Error("Generator is already running"); + if (o === s) { + if ("throw" === i) throw a; + return { + value: t, + done: !0 + }; + } + for (n.method = i, n.arg = a;;) { + var c = n.delegate; + if (c) { + var u = maybeInvokeDelegate(c, n); + if (u) { + if (u === y) continue; + return u; + } } - return isDueForHealthcheck; - }; - ApiCall.prototype.initializeMetadataForNodes = function () { - var _this = this; - if (this.nearestNode != null) { - this.nearestNode.index = "nearestNode"; - this.setNodeHealthcheck(this.nearestNode, HEALTHY); + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { + if (o === h) throw o = s, n.arg; + n.dispatchException(n.arg); + } else "return" === n.method && n.abrupt("return", n.arg); + o = f; + var p = tryCatch(e, r, n); + if ("normal" === p.type) { + if (o = n.done ? s : l, p.arg === y) continue; + return { + value: p.arg, + done: n.done + }; } - this.nodes.forEach(function (node, i) { - node.index = i; - _this.setNodeHealthcheck(node, HEALTHY); - }); - }; - ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) { - node.isHealthy = isHealthy; - node.lastAccessTimestamp = Date.now(); + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); + } }; - ApiCall.prototype.uriFor = function (endpoint, node) { - if (node.url != null) { - return "".concat(node.url).concat(endpoint); - } - return "".concat(node.protocol, "://").concat(node.host, ":").concat(node.port).concat(node.path).concat(endpoint); + } + function maybeInvokeDelegate(e, r) { + var n = r.method, + o = e.iterator[n]; + if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; + var i = tryCatch(o, e.iterator, r.arg); + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; + var a = i.arg; + return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); + } + function pushTryEntry(t) { + var e = { + tryLoc: t[0] }; - ApiCall.prototype.defaultHeaders = function () { - var defaultHeaders = {}; - if (!this.sendApiKeyAsQueryParam) { - defaultHeaders[APIKEYHEADERNAME] = this.apiKey; - } - defaultHeaders["Content-Type"] = "application/json"; - return defaultHeaders; + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); + } + function resetTryEntry(t) { + var e = t.completion || {}; + e.type = "normal", delete e.arg, t.completion = e; + } + function Context(t) { + this.tryEntries = [{ + tryLoc: "root" + }], t.forEach(pushTryEntry, this), this.reset(!0); + } + function values(e) { + if (e || "" === e) { + var r = e[a]; + if (r) return r.call(e); + if ("function" == typeof e.next) return e; + if (!isNaN(e.length)) { + var o = -1, + i = function next() { + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; + return next.value = t, next.done = !0, next; + }; + return i.next = i; + } + } + throw new TypeError(_typeof(e) + " is not iterable"); + } + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { + value: GeneratorFunctionPrototype, + configurable: !0 + }), o(GeneratorFunctionPrototype, "constructor", { + value: GeneratorFunction, + configurable: !0 + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { + var e = "function" == typeof t && t.constructor; + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); + }, e.mark = function (t) { + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; + }, e.awrap = function (t) { + return { + __await: t }; - ApiCall.prototype.timer = function (seconds) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })]; - }); - }); + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { + return this; + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { + void 0 === i && (i = Promise); + var a = new AsyncIterator(wrap(t, r, n, o), i); + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { + return t.done ? t.value : a.next(); + }); + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { + return this; + }), define(g, "toString", function () { + return "[object Generator]"; + }), e.keys = function (t) { + var e = Object(t), + r = []; + for (var n in e) r.push(n); + return r.reverse(), function next() { + for (; r.length;) { + var t = r.pop(); + if (t in e) return next.value = t, next.done = !1, next; + } + return next.done = !0, next; }; - ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) { - var errorMessage = "Request failed with HTTP code ".concat(response.status); - if (typeof messageFromServer === "string" && - messageFromServer.trim() !== "") { - errorMessage += " | Server said: ".concat(messageFromServer); - } - var error = new TypesenseError_1.default(errorMessage); - if (response.status === 400) { - error = new Errors_1.RequestMalformed(errorMessage); - } - else if (response.status === 401) { - error = new Errors_1.RequestUnauthorized(errorMessage); - } - else if (response.status === 404) { - error = new Errors_1.ObjectNotFound(errorMessage); - } - else if (response.status === 409) { - error = new Errors_1.ObjectAlreadyExists(errorMessage); - } - else if (response.status === 422) { - error = new Errors_1.ObjectUnprocessable(errorMessage); + }, e.values = values, Context.prototype = { + constructor: Context, + reset: function reset(e) { + if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); + }, + stop: function stop() { + this.done = !0; + var t = this.tryEntries[0].completion; + if ("throw" === t.type) throw t.arg; + return this.rval; + }, + dispatchException: function dispatchException(e) { + if (this.done) throw e; + var r = this; + function handle(n, o) { + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; + } + for (var o = this.tryEntries.length - 1; o >= 0; --o) { + var i = this.tryEntries[o], + a = i.completion; + if ("root" === i.tryLoc) return handle("end"); + if (i.tryLoc <= this.prev) { + var c = n.call(i, "catchLoc"), + u = n.call(i, "finallyLoc"); + if (c && u) { + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); + } else if (c) { + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); + } else { + if (!u) throw Error("try statement without catch or finally"); + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); + } } - else if (response.status >= 500 && response.status <= 599) { - error = new Errors_1.ServerError(errorMessage); + } + }, + abrupt: function abrupt(t, e) { + for (var r = this.tryEntries.length - 1; r >= 0; --r) { + var o = this.tryEntries[r]; + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { + var i = o; + break; } - else { - error = new Errors_1.HTTPError(errorMessage); + } + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); + var a = i ? i.completion : {}; + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); + }, + complete: function complete(t, e) { + if ("throw" === t.type) throw t.arg; + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; + }, + finish: function finish(t) { + for (var e = this.tryEntries.length - 1; e >= 0; --e) { + var r = this.tryEntries[e]; + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; + } + }, + "catch": function _catch(t) { + for (var e = this.tryEntries.length - 1; e >= 0; --e) { + var r = this.tryEntries[e]; + if (r.tryLoc === t) { + var n = r.completion; + if ("throw" === n.type) { + var o = n.arg; + resetTryEntry(r); + } + return o; } - error.httpStatus = response.status; - return error; - }; - return ApiCall; -}()); -exports["default"] = ApiCall; -//# sourceMappingURL=ApiCall.js.map + } + throw Error("illegal catch attempt"); + }, + delegateYield: function delegateYield(e, r, n) { + return this.delegate = { + iterator: values(e), + resultName: r, + nextLoc: n + }, "next" === this.method && (this.arg = t), y; + } + }, e; +} +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; /***/ }), -/***/ "./node_modules/typesense/lib/Typesense/Client.js": -/*!********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Client.js ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "./node_modules/@babel/runtime/helpers/typeof.js": +/*!*******************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! + \*******************************************************/ +/***/ ((module) => { -"use strict"; +function _typeof(o) { + "@babel/helpers - typeof"; + + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); +} +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/regenerator/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/@babel/runtime/regenerator/index.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// TODO(Babel 8): Remove this file. + +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); +module.exports = runtime; + +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + if (typeof globalThis === "object") { + globalThis.regeneratorRuntime = runtime; + } else { + Function("r", "regeneratorRuntime = r")(runtime); + } +} -/* eslint-disable no-dupe-class-members */ -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Configuration_1 = __importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); -var ApiCall_1 = __importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Collection_1 = __importDefault(__webpack_require__(/*! ./Collection */ "./node_modules/typesense/lib/Typesense/Collection.js")); -var Aliases_1 = __importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); -var Alias_1 = __importDefault(__webpack_require__(/*! ./Alias */ "./node_modules/typesense/lib/Typesense/Alias.js")); -var Keys_1 = __importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); -var Key_1 = __importDefault(__webpack_require__(/*! ./Key */ "./node_modules/typesense/lib/Typesense/Key.js")); -var Debug_1 = __importDefault(__webpack_require__(/*! ./Debug */ "./node_modules/typesense/lib/Typesense/Debug.js")); -var Metrics_1 = __importDefault(__webpack_require__(/*! ./Metrics */ "./node_modules/typesense/lib/Typesense/Metrics.js")); -var Health_1 = __importDefault(__webpack_require__(/*! ./Health */ "./node_modules/typesense/lib/Typesense/Health.js")); -var Operations_1 = __importDefault(__webpack_require__(/*! ./Operations */ "./node_modules/typesense/lib/Typesense/Operations.js")); -var MultiSearch_1 = __importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); -var Presets_1 = __importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); -var Preset_1 = __importDefault(__webpack_require__(/*! ./Preset */ "./node_modules/typesense/lib/Typesense/Preset.js")); -var Analytics_1 = __importDefault(__webpack_require__(/*! ./Analytics */ "./node_modules/typesense/lib/Typesense/Analytics.js")); -var Client = /** @class */ (function () { - function Client(options) { - var _a; - options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false; - this.configuration = new Configuration_1.default(options); - this.apiCall = new ApiCall_1.default(this.configuration); - this.debug = new Debug_1.default(this.apiCall); - this.metrics = new Metrics_1.default(this.apiCall); - this.health = new Health_1.default(this.apiCall); - this.operations = new Operations_1.default(this.apiCall); - this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration); - this._collections = new Collections_1.default(this.apiCall); - this.individualCollections = {}; - this._aliases = new Aliases_1.default(this.apiCall); - this.individualAliases = {}; - this._keys = new Keys_1.default(this.apiCall); - this.individualKeys = {}; - this._presets = new Presets_1.default(this.apiCall); - this.individualPresets = {}; - this.analytics = new Analytics_1.default(this.apiCall); - } - Client.prototype.collections = function (collectionName) { - if (collectionName === undefined) { - return this._collections; - } - else { - if (this.individualCollections[collectionName] === undefined) { - this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration); - } - return this.individualCollections[collectionName]; - } - }; - Client.prototype.aliases = function (aliasName) { - if (aliasName === undefined) { - return this._aliases; - } - else { - if (this.individualAliases[aliasName] === undefined) { - this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall); - } - return this.individualAliases[aliasName]; - } - }; - Client.prototype.keys = function (id) { - if (id === undefined) { - return this._keys; - } - else { - if (this.individualKeys[id] === undefined) { - this.individualKeys[id] = new Key_1.default(id, this.apiCall); - } - return this.individualKeys[id]; - } - }; - Client.prototype.presets = function (id) { - if (id === undefined) { - return this._presets; - } - else { - if (this.individualPresets[id] === undefined) { - this.individualPresets[id] = new Preset_1.default(id, this.apiCall); - } - return this.individualPresets[id]; - } - }; - return Client; -}()); -exports["default"] = Client; -//# sourceMappingURL=Client.js.map /***/ }), -/***/ "./node_modules/typesense/lib/Typesense/Collection.js": -/*!************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Collection.js ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "./node_modules/axios/dist/browser/axios.cjs": +/*!***************************************************!*\ + !*** ./node_modules/axios/dist/browser/axios.cjs ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; +// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } + +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} + +// utils is a library of generic helper functions non-specific to axios + +const {toString} = Object.prototype; +const {getPrototypeOf} = Object; + +const kindOf = (cache => thing => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); + +const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; + +const typeOfTest = type => thing => typeof thing === type; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ +const {isArray} = Array; + +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); + +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); + + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); + +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction = typeOfTest('function'); + +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); + +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = (thing) => thing !== null && typeof thing === 'object'; + +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = thing => thing === true || thing === false; + +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = (val) => { + if (kindOf(val) !== 'object') { + return false; + } + + const prototype = getPrototypeOf(val); + return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Documents_1 = __importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); -var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); -var Overrides_1 = __importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); -var Override_1 = __importDefault(__webpack_require__(/*! ./Override */ "./node_modules/typesense/lib/Typesense/Override.js")); -var Synonyms_1 = __importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); -var Synonym_1 = __importDefault(__webpack_require__(/*! ./Synonym */ "./node_modules/typesense/lib/Typesense/Synonym.js")); -var Document_1 = __webpack_require__(/*! ./Document */ "./node_modules/typesense/lib/Typesense/Document.js"); -var Collection = /** @class */ (function () { - function Collection(name, apiCall, configuration) { - this.name = name; - this.apiCall = apiCall; - this.configuration = configuration; - this.individualDocuments = {}; - this.individualOverrides = {}; - this.individualSynonyms = {}; - this.name = name; - this.apiCall = apiCall; - this.configuration = configuration; - this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration); - this._overrides = new Overrides_1.default(this.name, this.apiCall); - this._synonyms = new Synonyms_1.default(this.name, this.apiCall); - } - Collection.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Collection.prototype.update = function (schema) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)]; - }); - }); - }; - Collection.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; - }); - }); - }; - Collection.prototype.exists = function () { - return __awaiter(this, void 0, void 0, function () { - var e_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.retrieve()]; - case 1: - _a.sent(); - return [2 /*return*/, true]; - case 2: - e_1 = _a.sent(); - if (e_1 instanceof Errors_1.ObjectNotFound) - return [2 /*return*/, false]; - throw e_1; - case 3: return [2 /*return*/]; - } - }); - }); - }; - Collection.prototype.documents = function (documentId) { - if (!documentId) { - return this._documents; - } - else { - if (this.individualDocuments[documentId] === undefined) { - this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall); - } - return this.individualDocuments[documentId]; - } - }; - Collection.prototype.overrides = function (overrideId) { - if (overrideId === undefined) { - return this._overrides; - } - else { - if (this.individualOverrides[overrideId] === undefined) { - this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall); - } - return this.individualOverrides[overrideId]; - } - }; - Collection.prototype.synonyms = function (synonymId) { - if (synonymId === undefined) { - return this._synonyms; - } - else { - if (this.individualSynonyms[synonymId] === undefined) { - this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall); - } - return this.individualSynonyms[synonymId]; - } - }; - Collection.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.name); - }; - return Collection; -}()); -exports["default"] = Collection; -//# sourceMappingURL=Collection.js.map -/***/ }), +/** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ +const isDate = kindOfTest('Date'); -/***/ "./node_modules/typesense/lib/Typesense/Collections.js": -/*!*************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Collections.js ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); -"use strict"; +/** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ +const isBlob = kindOfTest('Blob'); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFileList = kindOfTest('FileList'); + +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = (val) => isObject(val) && isFunction(val.pipe); + +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +const isFormData = (thing) => { + let kind; + return thing && ( + (typeof FormData === 'function' && thing instanceof FormData) || ( + isFunction(thing.append) && ( + (kind = kindOf(thing)) === 'formdata' || + // detect form-data instance + (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') + ) + ) + ) }; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = (str) => str.trim ? + str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Boolean} [allOwnKeys = false] + * @returns {any} + */ +function forEach(obj, fn, {allOwnKeys = false} = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + let i; + let l; + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/collections"; -var Collections = /** @class */ (function () { - function Collections(apiCall) { - this.apiCall = apiCall; + } else { + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); } - Collections.prototype.create = function (schema, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)]; - }); - }); - }; - Collections.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - Object.defineProperty(Collections, "RESOURCEPATH", { - get: function () { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Collections; -}()); -exports["default"] = Collections; -//# sourceMappingURL=Collections.js.map + } +} -/***/ }), +function findKey(obj, key) { + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} -/***/ "./node_modules/typesense/lib/Typesense/Configuration.js": -/*!***************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Configuration.js ***! - \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : __webpack_require__.g) +})(); -"use strict"; +const isContextDefined = (context) => !isUndefined(context) && context !== _global; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var logger = __importStar(__webpack_require__(/*! loglevel */ "./node_modules/loglevel/lib/loglevel.js")); -var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); -var Configuration = /** @class */ (function () { - function Configuration(options) { - var _this = this; - this.nodes = options.nodes || []; - this.nodes = this.nodes - .map(function (node) { return _this.setDefaultPathInNode(node); }) - .map(function (node) { return _this.setDefaultPortInNode(node); }) - .map(function (node) { return (__assign({}, node)); }); // Make a deep copy - if (options.randomizeNodes == null) { - options.randomizeNodes = true; - } - if (options.randomizeNodes === true) { - this.shuffleArray(this.nodes); - } - this.nearestNode = options.nearestNode; - this.nearestNode = this.setDefaultPathInNode(this.nearestNode); - this.nearestNode = this.setDefaultPortInNode(this.nearestNode); - this.connectionTimeoutSeconds = - options.connectionTimeoutSeconds || options.timeoutSeconds || 5; - this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60; - this.numRetries = - options.numRetries || - this.nodes.length + (this.nearestNode == null ? 0 : 1) || - 3; - this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1; - this.apiKey = options.apiKey; - this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient - this.cacheSearchResultsForSeconds = - options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default - this.useServerSideSearchCache = options.useServerSideSearchCache || false; - this.logger = options.logger || logger; - this.logLevel = options.logLevel || "warn"; - this.logger.setLevel(this.logLevel); - this.additionalHeaders = options.additionalHeaders; - this.showDeprecationWarnings(options); - this.validate(); +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + const {caseless} = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = (val, key) => { + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject(result[targetKey]) && isPlainObject(val)) { + result[targetKey] = merge(result[targetKey], val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else { + result[targetKey] = val; } - Configuration.prototype.validate = function () { - if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) { - throw new Errors_1.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set"); - } - if (this.nearestNode != null && - this.isNodeMissingAnyParameters(this.nearestNode)) { - throw new Errors_1.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set"); - } - if (this.apiKey == null) { - throw new Errors_1.MissingConfigurationError("Ensure that apiKey is set"); - } - return true; - }; - Configuration.prototype.validateNodes = function () { - var _this = this; - return this.nodes.some(function (node) { - return _this.isNodeMissingAnyParameters(node); - }); - }; - Configuration.prototype.isNodeMissingAnyParameters = function (node) { - return (!["protocol", "host", "port", "path"].every(function (key) { - return node.hasOwnProperty(key); - }) && node["url"] == null); - }; - Configuration.prototype.setDefaultPathInNode = function (node) { - if (node != null && !node.hasOwnProperty("path")) { - node["path"] = ""; - } - return node; - }; - Configuration.prototype.setDefaultPortInNode = function (node) { - if (node != null && - !node.hasOwnProperty("port") && - node.hasOwnProperty("protocol")) { - switch (node["protocol"]) { - case "https": - node["port"] = 443; - break; - case "http": - node["port"] = 80; - break; - } - } - return node; - }; - Configuration.prototype.showDeprecationWarnings = function (options) { - if (options.timeoutSeconds) { - this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"); - } - if (options.masterNode) { - this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"); - } - if (options.readReplicaNodes) { - this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12"); - } - }; - Configuration.prototype.shuffleArray = function (array) { - var _a; - for (var i = array.length - 1; i > 0; i--) { - var j = Math.floor(Math.random() * (i + 1)); - _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1]; - } - }; - return Configuration; -}()); -exports["default"] = Configuration; -//# sourceMappingURL=Configuration.js.map + }; -/***/ }), + for (let i = 0, l = arguments.length; i < l; i++) { + arguments[i] && forEach(arguments[i], assignValue); + } + return result; +} -/***/ "./node_modules/typesense/lib/Typesense/Debug.js": -/*!*******************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Debug.js ***! - \*******************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Boolean} [allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, {allOwnKeys}= {}) => { + forEach(b, (val, key) => { + if (thisArg && isFunction(val)) { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }, {allOwnKeys}); + return a; +}; -"use strict"; +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + constructor.prototype.constructor = constructor; + Object.defineProperty(constructor, 'super', { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); }; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + + return destObj; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/debug"; -var Debug = /** @class */ (function () { - function Debug(apiCall) { - this.apiCall = apiCall; - } - Debug.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - return Debug; -}()); -exports["default"] = Debug; -//# sourceMappingURL=Debug.js.map -/***/ }), +/** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +}; -/***/ "./node_modules/typesense/lib/Typesense/Document.js": -/*!**********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Document.js ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -"use strict"; +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +/** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ +// eslint-disable-next-line func-names +const isTypedArray = (TypedArray => { + // eslint-disable-next-line func-names + return thing => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); + +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[Symbol.iterator]; + + const iterator = generator.call(obj); + + let result; + + while ((result = iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } }; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; + + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + + return arr; +}; + +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); + +const toCamelCase = str => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, + function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + } + ); +}; + +/* Creating a function that will check if an object has a property. */ +const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); + +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); + +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; } + }); + + Object.defineProperties(obj, reducedDescriptors); }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Document = void 0; -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Documents_1 = __importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); -var Document = /** @class */ (function () { - function Document(collectionName, documentId, apiCall) { - this.collectionName = collectionName; - this.documentId = documentId; - this.apiCall = apiCall; + +/** + * Makes all methods read-only + * @param {Object} obj + */ + +const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { + return false; } - Document.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Document.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; - }); - }); - }; - Document.prototype.update = function (partialDocument, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)]; - }); - }); - }; - Document.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, "/").concat(this.documentId); - }; - return Document; -}()); -exports.Document = Document; -//# sourceMappingURL=Document.js.map -/***/ }), + const value = obj[name]; -/***/ "./node_modules/typesense/lib/Typesense/Documents.js": -/*!***********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Documents.js ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (!isFunction(value)) return; -"use strict"; + descriptor.enumerable = false; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + if ('writable' in descriptor) { + descriptor.writable = false; + return; } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); -var SearchOnlyDocuments_1 = __webpack_require__(/*! ./SearchOnlyDocuments */ "./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js"); -var Documents = /** @class */ (function (_super) { - __extends(Documents, _super); - function Documents(collectionName, apiCall, configuration) { - return _super.call(this, collectionName, apiCall, configuration) || this; + + if (!descriptor.set) { + descriptor.set = () => { + throw Error('Can not rewrite read-only method \'' + name + '\''); + }; } - Documents.prototype.create = function (document, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (!document) - throw new Error("No document provided"); - return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)]; - }); - }); - }; - Documents.prototype.upsert = function (document, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (!document) - throw new Error("No document provided"); - return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: "upsert" }))]; - }); - }); - }; - Documents.prototype.update = function (document, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (!document) - throw new Error("No document provided"); - if (options["filter_by"] != null) { - return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))]; - } - else { - return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: "update" }))]; - } - return [2 /*return*/]; - }); - }); - }; - Documents.prototype.delete = function (idOrQuery) { - if (idOrQuery === void 0) { idOrQuery = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (typeof idOrQuery === "string") { - return [2 /*return*/, this.apiCall.delete(this.endpointPath(idOrQuery), idOrQuery)]; - } - else { - return [2 /*return*/, this.apiCall.delete(this.endpointPath(), idOrQuery)]; - } - return [2 /*return*/]; - }); - }); - }; - Documents.prototype.createMany = function (documents, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"); - return [2 /*return*/, this.import(documents, options)]; - }); - }); - }; - Documents.prototype.import = function (documents, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (Array.isArray(documents)) { - try { - documentsInJSONLFormat = documents - .map(function (document) { return JSON.stringify(document); }) - .join("\n"); - } - catch (error) { - // if rangeerror, throw custom error message - if (RangeError instanceof error && - (error === null || error === void 0 ? void 0 : error.includes("Too many properties to enumerate"))) { - throw new Error("".concat(error, "\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n ")); - } - // else, throw the non-range error anyways - throw new Error(error); - } - } - else { - documentsInJSONLFormat = documents; - } - return [4 /*yield*/, this.apiCall.performRequest("post", this.endpointPath("import"), { - queryParameters: options, - bodyParameters: documentsInJSONLFormat, - additionalHeaders: { "Content-Type": "text/plain" }, - skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully - })]; - case 1: - resultsInJSONLFormat = _a.sent(); - if (Array.isArray(documents)) { - resultsInJSONFormat = resultsInJSONLFormat - .split("\n") - .map(function (r) { return JSON.parse(r); }); - failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; }); - if (failedItems.length > 0) { - throw new Errors_1.ImportError("".concat(resultsInJSONFormat.length - failedItems.length, " documents imported successfully, ").concat(failedItems.length, " documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."), resultsInJSONFormat); - } - else { - return [2 /*return*/, resultsInJSONFormat]; - } - } - else { - return [2 /*return*/, resultsInJSONLFormat]; - } - return [2 /*return*/]; - } - }); - }); - }; - /** - * Returns a JSONL string for all the documents in this collection - */ - Documents.prototype.export = function (options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options)]; - }); - }); - }; - /** - * Returns a NodeJS readable stream of JSONL for all the documents in this collection. - */ - Documents.prototype.exportStream = function (options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options, { - responseType: "stream", - })]; - }); - }); - }; - return Documents; -}(SearchOnlyDocuments_1.SearchOnlyDocuments)); -exports["default"] = Documents; -//# sourceMappingURL=Documents.js.map + }); +}; + +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; -/***/ }), + const define = (arr) => { + arr.forEach(value => { + obj[value] = true; + }); + }; -/***/ "./node_modules/typesense/lib/Typesense/Errors/HTTPError.js": -/*!******************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/HTTPError.js ***! - \******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); -"use strict"; + return obj; +}; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +const noop = () => {}; + +const toFiniteNumber = (value, defaultValue) => { + value = +value; + return Number.isFinite(value) ? value : defaultValue; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var HTTPError = /** @class */ (function (_super) { - __extends(HTTPError, _super); - function HTTPError() { - return _super !== null && _super.apply(this, arguments) || this; + +const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; + +const DIGIT = '0123456789'; + +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +}; + +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const {length} = alphabet; + while (size--) { + str += alphabet[Math.random() * length|0]; + } + + return str; +}; + +/** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ +function isSpecCompliantForm(thing) { + return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); +} + +const toJSONObject = (obj) => { + const stack = new Array(10); + + const visit = (source, i) => { + + if (isObject(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + + if(!('toJSON' in source)) { + stack[i] = source; + const target = isArray(source) ? [] : {}; + + forEach(source, (value, key) => { + const reducedValue = visit(value, i + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + + stack[i] = undefined; + + return target; + } } - return HTTPError; -}(TypesenseError_1.default)); -exports["default"] = HTTPError; -//# sourceMappingURL=HTTPError.js.map -/***/ }), + return source; + }; -/***/ "./node_modules/typesense/lib/Typesense/Errors/ImportError.js": -/*!********************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/ImportError.js ***! - \********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + return visit(obj, 0); +}; -"use strict"; +const isAsyncFn = kindOfTest('AsyncFunction'); + +const isThenable = (thing) => + thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); + +var utils$1 = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isUndefined, + isDate, + isFile, + isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + ALPHABET, + generateString, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable +}; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ +function AxiosError(message, code, config, request, response) { + Error.call(this); + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = (new Error()).stack; + } + + this.message = message; + this.name = 'AxiosError'; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + response && (this.response = response); +} + +utils$1.inherits(AxiosError, Error, { + toJSON: function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: utils$1.toJSONObject(this.config), + code: this.code, + status: this.response && this.response.status ? this.response.status : null }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; + } +}); + +const prototype$1 = AxiosError.prototype; +const descriptors = {}; + +[ + 'ERR_BAD_OPTION_VALUE', + 'ERR_BAD_OPTION', + 'ECONNABORTED', + 'ETIMEDOUT', + 'ERR_NETWORK', + 'ERR_FR_TOO_MANY_REDIRECTS', + 'ERR_DEPRECATED', + 'ERR_BAD_RESPONSE', + 'ERR_BAD_REQUEST', + 'ERR_CANCELED', + 'ERR_NOT_SUPPORT', + 'ERR_INVALID_URL' +// eslint-disable-next-line func-names +].forEach(code => { + descriptors[code] = {value: code}; +}); + +Object.defineProperties(AxiosError, descriptors); +Object.defineProperty(prototype$1, 'isAxiosError', {value: true}); + +// eslint-disable-next-line func-names +AxiosError.from = (error, code, config, request, response, customProps) => { + const axiosError = Object.create(prototype$1); + + utils$1.toFlatObject(error, axiosError, function filter(obj) { + return obj !== Error.prototype; + }, prop => { + return prop !== 'isAxiosError'; + }); + + AxiosError.call(axiosError, error.message, code, config, request, response); + + axiosError.cause = error; + + axiosError.name = error.name; + + customProps && Object.assign(axiosError, customProps); + + return axiosError; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var ImportError = /** @class */ (function (_super) { - __extends(ImportError, _super); - function ImportError(message, importResults) { - var _this = _super.call(this, message) || this; - _this.importResults = importResults; - return _this; + +// eslint-disable-next-line strict +var httpAdapter = null; + +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return utils$1.isPlainObject(thing) || utils$1.isArray(thing); +} + +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }).join(dots ? '.' : ''); +} + +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return utils$1.isArray(arr) && !arr.some(isVisitable); +} + +const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); + +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!utils$1.isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (FormData)(); + + // eslint-disable-next-line no-param-reassign + options = utils$1.toFlatObject(options, { + metaTokens: true, + dots: false, + indexes: false + }, false, function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !utils$1.isUndefined(source[option]); + }); + + const metaTokens = options.metaTokens; + // eslint-disable-next-line no-use-before-define + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; + const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); + + if (!utils$1.isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + + function convertValue(value) { + if (value === null) return ''; + + if (utils$1.isDate(value)) { + return value.toISOString(); } - return ImportError; -}(TypesenseError_1.default)); -exports["default"] = ImportError; -//# sourceMappingURL=ImportError.js.map -/***/ }), + if (!useBlob && utils$1.isBlob(value)) { + throw new AxiosError('Blob is not supported. Use a Buffer instead.'); + } + + if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { + return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); + } + + return value; + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + + if (value && !path && typeof value === 'object') { + if (utils$1.endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = JSON.stringify(value); + } else if ( + (utils$1.isArray(value) && isFlatArray(value)) || + ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)) + )) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + + arr.forEach(function each(el, index) { + !(utils$1.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), + convertValue(el) + ); + }); + return false; + } + } + + if (isVisitable(value)) { + return true; + } + + formData.append(renderKey(path, key, dots), convertValue(value)); + + return false; + } + + const stack = []; + + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + + function build(value, path) { + if (utils$1.isUndefined(value)) return; + + if (stack.indexOf(value) !== -1) { + throw Error('Circular reference detected in ' + path.join('.')); + } + + stack.push(value); + + utils$1.forEach(value, function each(el, key) { + const result = !(utils$1.isUndefined(el) || el === null) && visitor.call( + formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers + ); + + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }); + + stack.pop(); + } + + if (!utils$1.isObject(obj)) { + throw new TypeError('data must be an object'); + } + + build(obj); + + return formData; +} + +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode$1(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + '%00': '\x00' + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { + return charMap[match]; + }); +} + +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + + params && toFormData(params, this, options); +} + +const prototype = AxiosURLSearchParams.prototype; + +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; + +prototype.toString = function toString(encoder) { + const _encode = encoder ? function(value) { + return encoder.call(this, value, encode$1); + } : encode$1; + + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '').join('&'); +}; + +/** + * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their + * URI encoded counterparts + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +function encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} -/***/ "./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js ***! - \**********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?object} options + * + * @returns {string} The formatted url + */ +function buildURL(url, params, options) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + const _encode = options && options.encode || encode; -"use strict"; + const serializeFn = options && options.serialize; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var MissingConfigurationError = /** @class */ (function (_super) { - __extends(MissingConfigurationError, _super); - function MissingConfigurationError() { - return _super !== null && _super.apply(this, arguments) || this; + let serializedParams; + + if (serializeFn) { + serializedParams = serializeFn(params, options); + } else { + serializedParams = utils$1.isURLSearchParams(params) ? + params.toString() : + new AxiosURLSearchParams(params, options).toString(_encode); + } + + if (serializedParams) { + const hashmarkIndex = url.indexOf("#"); + + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); } - return MissingConfigurationError; -}(TypesenseError_1.default)); -exports["default"] = MissingConfigurationError; -//# sourceMappingURL=MissingConfigurationError.js.map + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } -/***/ }), + return url; +} -/***/ "./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js": -/*!****************************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js ***! - \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +class InterceptorManager { + constructor() { + this.handlers = []; + } -"use strict"; + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var ObjectAlreadyExists = /** @class */ (function (_super) { - __extends(ObjectAlreadyExists, _super); - function ObjectAlreadyExists() { - return _super !== null && _super.apply(this, arguments) || this; + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; } - return ObjectAlreadyExists; -}(TypesenseError_1.default)); -exports["default"] = ObjectAlreadyExists; -//# sourceMappingURL=ObjectAlreadyExists.js.map + } -/***/ }), + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } -/***/ "./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js": -/*!***********************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils$1.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } +} -"use strict"; +var InterceptorManager$1 = InterceptorManager; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +var transitionalDefaults = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var ObjectNotFound = /** @class */ (function (_super) { - __extends(ObjectNotFound, _super); - function ObjectNotFound() { - return _super !== null && _super.apply(this, arguments) || this; - } - return ObjectNotFound; -}(TypesenseError_1.default)); -exports["default"] = ObjectNotFound; -//# sourceMappingURL=ObjectNotFound.js.map -/***/ }), +var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; -/***/ "./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js": -/*!****************************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js ***! - \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +var FormData$1 = typeof FormData !== 'undefined' ? FormData : null; -"use strict"; +var Blob$1 = typeof Blob !== 'undefined' ? Blob : null; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +var platform$1 = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams$1, + FormData: FormData$1, + Blob: Blob$1 + }, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var ObjectUnprocessable = /** @class */ (function (_super) { - __extends(ObjectUnprocessable, _super); - function ObjectUnprocessable() { - return _super !== null && _super.apply(this, arguments) || this; - } - return ObjectUnprocessable; -}(TypesenseError_1.default)); -exports["default"] = ObjectUnprocessable; -//# sourceMappingURL=ObjectUnprocessable.js.map -/***/ }), - -/***/ "./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js": -/*!*************************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js ***! - \*************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; -"use strict"; +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const hasStandardBrowserEnv = ( + (product) => { + return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0 + })(typeof navigator !== 'undefined' && navigator.product); -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ +const hasStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); })(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; + +var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + hasBrowserEnv: hasBrowserEnv, + hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, + hasStandardBrowserEnv: hasStandardBrowserEnv +}); + +var platform = { + ...utils, + ...platform$1 }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var RequestMalformed = /** @class */ (function (_super) { - __extends(RequestMalformed, _super); - function RequestMalformed() { - return _super !== null && _super.apply(this, arguments) || this; + +function toURLEncodedForm(data, options) { + return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ + visitor: function(value, key, path, helpers) { + if (platform.isNode && utils$1.isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + + return helpers.defaultVisitor.apply(this, arguments); } - return RequestMalformed; -}(TypesenseError_1.default)); -exports["default"] = RequestMalformed; -//# sourceMappingURL=RequestMalformed.js.map + }, options)); +} -/***/ }), +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] + // foo.x.y.z + // foo-x-y-z + // foo x y z + return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => { + return match[0] === '[]' ? '' : match[1] || match[0]; + }); +} -/***/ "./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js": -/*!****************************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js ***! - \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} -"use strict"; +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var RequestUnauthorized = /** @class */ (function (_super) { - __extends(RequestUnauthorized, _super); - function RequestUnauthorized() { - return _super !== null && _super.apply(this, arguments) || this; - } - return RequestUnauthorized; -}(TypesenseError_1.default)); -exports["default"] = RequestUnauthorized; -//# sourceMappingURL=RequestUnauthorized.js.map + if (name === '__proto__') return true; -/***/ }), + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils$1.isArray(target) ? target.length : name; -/***/ "./node_modules/typesense/lib/Typesense/Errors/ServerError.js": -/*!********************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/ServerError.js ***! - \********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (isLast) { + if (utils$1.hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } -"use strict"; + return !isNumericKey; + } -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -var ServerError = /** @class */ (function (_super) { - __extends(ServerError, _super); - function ServerError() { - return _super !== null && _super.apply(this, arguments) || this; + if (!target[name] || !utils$1.isObject(target[name])) { + target[name] = []; } - return ServerError; -}(TypesenseError_1.default)); -exports["default"] = ServerError; -//# sourceMappingURL=ServerError.js.map -/***/ }), + const result = buildPath(path, value, target[name], index); -/***/ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js": -/*!***********************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js ***! - \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { + if (result && utils$1.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } -"use strict"; + return !isNumericKey; + } -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError = /** @class */ (function (_super) { - __extends(TypesenseError, _super); - // Source: https://stackoverflow.com/a/58417721/123545 - function TypesenseError(message) { - var _newTarget = this.constructor; - var _this = _super.call(this, message) || this; - _this.name = _newTarget.name; - Object.setPrototypeOf(_this, _newTarget.prototype); - return _this; + if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { + const obj = {}; + + utils$1.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + + return obj; + } + + return null; +} + +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (utils$1.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils$1.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } } - return TypesenseError; -}(Error)); -exports["default"] = TypesenseError; -//# sourceMappingURL=TypesenseError.js.map + } -/***/ }), + return (encoder || JSON.stringify)(rawValue); +} -/***/ "./node_modules/typesense/lib/Typesense/Errors/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Errors/index.js ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +const defaults = { -"use strict"; + transitional: transitionalDefaults, -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0; -var HTTPError_1 = __importDefault(__webpack_require__(/*! ./HTTPError */ "./node_modules/typesense/lib/Typesense/Errors/HTTPError.js")); -exports.HTTPError = HTTPError_1.default; -var MissingConfigurationError_1 = __importDefault(__webpack_require__(/*! ./MissingConfigurationError */ "./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js")); -exports.MissingConfigurationError = MissingConfigurationError_1.default; -var ObjectAlreadyExists_1 = __importDefault(__webpack_require__(/*! ./ObjectAlreadyExists */ "./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js")); -exports.ObjectAlreadyExists = ObjectAlreadyExists_1.default; -var ObjectNotFound_1 = __importDefault(__webpack_require__(/*! ./ObjectNotFound */ "./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js")); -exports.ObjectNotFound = ObjectNotFound_1.default; -var ObjectUnprocessable_1 = __importDefault(__webpack_require__(/*! ./ObjectUnprocessable */ "./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js")); -exports.ObjectUnprocessable = ObjectUnprocessable_1.default; -var RequestMalformed_1 = __importDefault(__webpack_require__(/*! ./RequestMalformed */ "./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js")); -exports.RequestMalformed = RequestMalformed_1.default; -var RequestUnauthorized_1 = __importDefault(__webpack_require__(/*! ./RequestUnauthorized */ "./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js")); -exports.RequestUnauthorized = RequestUnauthorized_1.default; -var ServerError_1 = __importDefault(__webpack_require__(/*! ./ServerError */ "./node_modules/typesense/lib/Typesense/Errors/ServerError.js")); -exports.ServerError = ServerError_1.default; -var ImportError_1 = __importDefault(__webpack_require__(/*! ./ImportError */ "./node_modules/typesense/lib/Typesense/Errors/ImportError.js")); -exports.ImportError = ImportError_1.default; -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); -exports.TypesenseError = TypesenseError_1.default; -//# sourceMappingURL=index.js.map + adapter: ['xhr', 'http'], -/***/ }), + transformRequest: [function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils$1.isObject(data); -/***/ "./node_modules/typesense/lib/Typesense/Health.js": -/*!********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Health.js ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { + if (isObjectPayload && utils$1.isHTMLForm(data)) { + data = new FormData(data); + } -"use strict"; + const isFormData = utils$1.isFormData(data); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/health"; -var Health = /** @class */ (function () { - function Health(apiCall) { - this.apiCall = apiCall; + + if (utils$1.isArrayBuffer(data) || + utils$1.isBuffer(data) || + utils$1.isStream(data) || + utils$1.isFile(data) || + utils$1.isBlob(data) + ) { + return data; + } + if (utils$1.isArrayBufferView(data)) { + return data.buffer; + } + if (utils$1.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); } - Health.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - return Health; -}()); -exports["default"] = Health; -//# sourceMappingURL=Health.js.map -/***/ }), + let isFileList; -/***/ "./node_modules/typesense/lib/Typesense/Key.js": -/*!*****************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Key.js ***! - \*****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (isObjectPayload) { + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } -"use strict"; + if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { + const _FormData = this.env && this.env.FormData; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + return toFormData( + isFileList ? {'files[]': data} : data, + _FormData && new _FormData(), + this.formSerializer + ); + } } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Keys_1 = __importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); -var Key = /** @class */ (function () { - function Key(id, apiCall) { - this.id = id; - this.apiCall = apiCall; + + if (isObjectPayload || hasJSONContentType ) { + headers.setContentType('application/json', false); + return stringifySafely(data); } - Key.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Key.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; - }); - }); - }; - Key.prototype.endpointPath = function () { - return "".concat(Keys_1.default.RESOURCEPATH, "/").concat(this.id); - }; - return Key; -}()); -exports["default"] = Key; -//# sourceMappingURL=Key.js.map -/***/ }), + return data; + }], -/***/ "./node_modules/typesense/lib/Typesense/Keys.js": -/*!******************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Keys.js ***! - \******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + transformResponse: [function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === 'json'; -"use strict"; + if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var crypto_1 = __webpack_require__(/*! crypto */ "?6884"); -var RESOURCEPATH = "/keys"; -var Keys = /** @class */ (function () { - function Keys(apiCall) { - this.apiCall = apiCall; - this.apiCall = apiCall; + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; + } + } } - Keys.prototype.create = function (params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)]; - }); - }); - }; - Keys.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) { - // Note: only a key generated with the `documents:search` action will be - // accepted by the server, when usined with the search endpoint. - var paramsJSON = JSON.stringify(parameters); - var digest = Buffer.from((0, crypto_1.createHmac)("sha256", searchKey).update(paramsJSON).digest("base64")); - var keyPrefix = searchKey.substr(0, 4); - var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); - return Buffer.from(rawScopedKey).toString("base64"); - }; - Object.defineProperty(Keys, "RESOURCEPATH", { - get: function () { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Keys; -}()); -exports["default"] = Keys; -//# sourceMappingURL=Keys.js.map -/***/ }), + return data; + }], -/***/ "./node_modules/typesense/lib/Typesense/Metrics.js": -/*!*********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Metrics.js ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, -"use strict"; + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + maxContentLength: -1, + maxBodyLength: -1, + + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob + }, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': undefined } + } }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/metrics.json"; -var Metrics = /** @class */ (function () { - function Metrics(apiCall) { - this.apiCall = apiCall; - } - Metrics.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - return Metrics; -}()); -exports["default"] = Metrics; -//# sourceMappingURL=Metrics.js.map -/***/ }), +utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { + defaults.headers[method] = {}; +}); + +var defaults$1 = defaults; + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = utils$1.toObjectSet([ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +var parseHeaders = rawHeaders => { + const parsed = {}; + let key; + let val; + let i; -/***/ "./node_modules/typesense/lib/Typesense/MultiSearch.js": -/*!*************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/MultiSearch.js ***! - \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); -"use strict"; + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + if (key === 'set-cookie') { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } + }); + + return parsed; }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RequestWithCache_1 = __importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); -var RESOURCEPATH = "/multi_search"; -var MultiSearch = /** @class */ (function () { - function MultiSearch(apiCall, configuration, useTextContentType) { - if (useTextContentType === void 0) { useTextContentType = false; } - this.apiCall = apiCall; - this.configuration = configuration; - this.useTextContentType = useTextContentType; - this.requestWithCache = new RequestWithCache_1.default(); - } - MultiSearch.prototype.clearCache = function () { - this.requestWithCache.clearCache(); - }; - MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) { - if (commonParams === void 0) { commonParams = {}; } - var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration - .cacheSearchResultsForSeconds : _c; - return __awaiter(this, void 0, void 0, function () { - var additionalHeaders, additionalQueryParams, queryParams; - return __generator(this, function (_d) { - additionalHeaders = {}; - if (this.useTextContentType) { - additionalHeaders["content-type"] = "text/plain"; - } - additionalQueryParams = {}; - if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; - } - queryParams = Object.assign({}, commonParams, additionalQueryParams); - return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })]; - }); - }); - }; - return MultiSearch; -}()); -exports["default"] = MultiSearch; -//# sourceMappingURL=MultiSearch.js.map -/***/ }), +const $internals = Symbol('internals'); -/***/ "./node_modules/typesense/lib/Typesense/Operations.js": -/*!************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Operations.js ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} -"use strict"; +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/operations"; -var Operations = /** @class */ (function () { - function Operations(apiCall) { - this.apiCall = apiCall; - } - Operations.prototype.perform = function (operationName, queryParameters) { - if (queryParameters === void 0) { queryParameters = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.post("".concat(RESOURCEPATH, "/").concat(operationName), {}, queryParameters)]; - }); - }); - }; - return Operations; -}()); -exports["default"] = Operations; -//# sourceMappingURL=Operations.js.map + return utils$1.isArray(value) ? value.map(normalizeValue) : String(value); +} -/***/ }), +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; -/***/ "./node_modules/typesense/lib/Typesense/Override.js": -/*!**********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Override.js ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } -"use strict"; + return tokens; +} -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Overrides_1 = __importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); -var Override = /** @class */ (function () { - function Override(collectionName, overrideId, apiCall) { - this.collectionName = collectionName; - this.overrideId = overrideId; - this.apiCall = apiCall; - } - Override.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Override.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; - }); - }); - }; - Override.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, "/").concat(this.overrideId); - }; - return Override; -}()); -exports["default"] = Override; -//# sourceMappingURL=Override.js.map +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); -/***/ }), +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils$1.isFunction(filter)) { + return filter.call(this, value, header); + } -/***/ "./node_modules/typesense/lib/Typesense/Overrides.js": -/*!***********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Overrides.js ***! - \***********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (isHeaderNameFilter) { + value = header; + } + + if (!utils$1.isString(value)) return; -"use strict"; + if (utils$1.isString(filter)) { + return value.indexOf(filter) !== -1; + } -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + if (utils$1.isRegExp(filter)) { + return filter.test(value); + } +} + +function formatHeader(header) { + return header.trim() + .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var RESOURCEPATH = "/overrides"; -var Overrides = /** @class */ (function () { - function Overrides(collectionName, apiCall) { - this.collectionName = collectionName; - this.apiCall = apiCall; - } - Overrides.prototype.upsert = function (overrideId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)]; - }); - }); - }; - Overrides.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Overrides.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; - Object.defineProperty(Overrides, "RESOURCEPATH", { - get: function () { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true +} + +function buildAccessors(obj, header) { + const accessorName = utils$1.toCamelCase(' ' + header); + + ['get', 'set', 'has'].forEach(methodName => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true }); - return Overrides; -}()); -exports["default"] = Overrides; -//# sourceMappingURL=Overrides.js.map + }); +} -/***/ }), +class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } -/***/ "./node_modules/typesense/lib/Typesense/Preset.js": -/*!********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Preset.js ***! - \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + set(header, valueOrRewrite, rewrite) { + const self = this; -"use strict"; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + if (!lHeader) { + throw new Error('header name must be a non-empty string'); + } + + const key = utils$1.findKey(self, lHeader); + + if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { + self[key || _header] = normalizeValue(_value); + } } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Presets_1 = __importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); -var Preset = /** @class */ (function () { - function Preset(presetId, apiCall) { - this.presetId = presetId; - this.apiCall = apiCall; + + const setHeaders = (headers, _rewrite) => + utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + + if (utils$1.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); } - Preset.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Preset.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; - }); - }); - }; - Preset.prototype.endpointPath = function () { - return "".concat(Presets_1.default.RESOURCEPATH, "/").concat(this.presetId); - }; - return Preset; -}()); -exports["default"] = Preset; -//# sourceMappingURL=Preset.js.map -/***/ }), + return this; + } -/***/ "./node_modules/typesense/lib/Typesense/Presets.js": -/*!*********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Presets.js ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { + get(header, parser) { + header = normalizeHeader(header); -"use strict"; + if (header) { + const key = utils$1.findKey(this, header); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + if (key) { + const value = this[key]; + + if (!parser) { + return value; + } + + if (parser === true) { + return parseTokens(value); + } + + if (utils$1.isFunction(parser)) { + return parser.call(this, value, key); + } + + if (utils$1.isRegExp(parser)) { + return parser.exec(value); + } + + throw new TypeError('parser must be boolean|regexp|function'); + } } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RESOURCEPATH = "/presets"; -var Presets = /** @class */ (function () { - function Presets(apiCall) { - this.apiCall = apiCall; + } + + has(header, matcher) { + header = normalizeHeader(header); + + if (header) { + const key = utils$1.findKey(this, header); + + return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); } - Presets.prototype.upsert = function (presetId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)]; - }); - }); - }; - Presets.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Presets.prototype.endpointPath = function (operation) { - return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; - Object.defineProperty(Presets, "RESOURCEPATH", { - get: function () { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true + + return false; + } + + delete(header, matcher) { + const self = this; + let deleted = false; + + function deleteHeader(_header) { + _header = normalizeHeader(_header); + + if (_header) { + const key = utils$1.findKey(self, _header); + + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + + deleted = true; + } + } + } + + if (utils$1.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + + return deleted; + } + + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + + while (i--) { + const key = keys[i]; + if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + + return deleted; + } + + normalize(format) { + const self = this; + const headers = {}; + + utils$1.forEach(this, (value, header) => { + const key = utils$1.findKey(headers, header); + + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + + const normalized = format ? formatHeader(header) : String(header).trim(); + + if (normalized !== header) { + delete self[header]; + } + + self[normalized] = normalizeValue(value); + + headers[normalized] = true; }); - return Presets; -}()); -exports["default"] = Presets; -//# sourceMappingURL=Presets.js.map -/***/ }), + return this; + } -/***/ "./node_modules/typesense/lib/Typesense/RequestWithCache.js": -/*!******************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/RequestWithCache.js ***! - \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { + concat(...targets) { + return this.constructor.concat(this, ...targets); + } -"use strict"; + toJSON(asStrings) { + const obj = Object.create(null); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + utils$1.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + + return obj; + } + + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + } + + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + + static concat(first, ...targets) { + const computed = new this(first); + + targets.forEach((target) => computed.set(target)); + + return computed; + } + + static accessor(header) { + const internals = this[$internals] = (this[$internals] = { + accessors: {} + }); + + const accessors = internals.accessors; + const prototype = this.prototype; + + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } } -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } + + utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; + } +} + +AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); + +// reserved names hotfix +utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var defaultCacheResponseForSeconds = 2 * 60; -var defaultMaxSize = 100; -var RequestWithCache = /** @class */ (function () { - function RequestWithCache() { - this.responseCache = new Map(); - this.responsePromiseCache = new Map(); + } +}); + +utils$1.freezeMethods(AxiosHeaders); + +var AxiosHeaders$1 = AxiosHeaders; + +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +function transformData(fns, response) { + const config = this || defaults$1; + const context = response || config; + const headers = AxiosHeaders$1.from(context.headers); + let data = context.data; + + utils$1.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + + headers.normalize(); + + return data; +} + +function isCancel(value) { + return !!(value && value.__CANCEL__); +} + +/** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ +function CanceledError(message, config, request) { + // eslint-disable-next-line no-eq-null,eqeqeq + AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); + this.name = 'CanceledError'; +} + +utils$1.inherits(CanceledError, AxiosError, { + __CANCEL__: true +}); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new AxiosError( + 'Request failed with status code ' + response.status, + [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + )); + } +} + +var cookies = platform.hasStandardBrowserEnv ? + + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + '=' + encodeURIComponent(value)]; + + utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); + + utils$1.isString(path) && cookie.push('path=' + path); + + utils$1.isString(domain) && cookie.push('domain=' + domain); + + secure === true && cookie.push('secure'); + + document.cookie = cookie.join('; '); + }, + + read(name) { + const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove(name) { + this.write(name, '', Date.now() - 86400000); } - RequestWithCache.prototype.clearCache = function () { - this.responseCache = new Map(); - this.responsePromiseCache = new Map(); - }; - // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way - RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) { - return __awaiter(this, void 0, void 0, function () { - var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b; - isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0; - if (isCacheDisabled) { - return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))]; - } - requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments); - cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON); - now = Date.now(); - if (cacheEntry) { - isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000; - if (isEntryValid) { - this.responseCache.delete(requestFunctionArgumentsJSON); - this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry); - return [2 /*return*/, Promise.resolve(cacheEntry.response)]; - } - else { - this.responseCache.delete(requestFunctionArgumentsJSON); - } - } - cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON); - if (cachePromiseEntry) { - isEntryValid = now - cachePromiseEntry.requestTimestamp < - cacheResponseForSeconds * 1000; - if (isEntryValid) { - this.responsePromiseCache.delete(requestFunctionArgumentsJSON); - this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry); - return [2 /*return*/, cachePromiseEntry.responsePromise]; - } - else { - this.responsePromiseCache.delete(requestFunctionArgumentsJSON); - } - } - responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false)); - this.responsePromiseCache.set(requestFunctionArgumentsJSON, { - requestTimestamp: now, - responsePromise: responsePromise, - }); - return [4 /*yield*/, responsePromise]; - case 1: - response = _c.sent(); - this.responseCache.set(requestFunctionArgumentsJSON, { - requestTimestamp: now, - response: response, - }); - isCacheOverMaxSize = this.responseCache.size > maxSize; - if (isCacheOverMaxSize) { - oldestEntry = this.responseCache.keys().next().value; - this.responseCache.delete(oldestEntry); - } - isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize; - if (isResponsePromiseCacheOverMaxSize) { - oldestEntry = this.responsePromiseCache.keys().next().value; - this.responsePromiseCache.delete(oldestEntry); - } - return [2 /*return*/, response]; - } - }); - }); - }; - return RequestWithCache; -}()); -exports["default"] = RequestWithCache; -//# sourceMappingURL=RequestWithCache.js.map + } + + : + + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + remove() {} + }; + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} -/***/ }), +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +} -/***/ "./node_modules/typesense/lib/Typesense/SearchClient.js": -/*!**************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/SearchClient.js ***! - \**************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +function buildFullPath(baseURL, requestedURL) { + if (baseURL && !isAbsoluteURL(requestedURL)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} -"use strict"; +var isURLSameOrigin = platform.hasStandardBrowserEnv ? -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Configuration_1 = __importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); -var ApiCall_1 = __importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); -var MultiSearch_1 = __importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); -var SearchOnlyCollection_1 = __webpack_require__(/*! ./SearchOnlyCollection */ "./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js"); -var SearchClient = /** @class */ (function () { - function SearchClient(options) { - var _a; - options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true; - if (options.sendApiKeyAsQueryParam === true && - (options.apiKey || "").length > 2000) { - console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."); - options.sendApiKeyAsQueryParam = false; - } - this.configuration = new Configuration_1.default(options); - this.apiCall = new ApiCall_1.default(this.configuration); - this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true); - this.individualCollections = {}; +// Standard browser envs have full support of the APIs needed to test +// whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + const msie = /(msie|trident)/i.test(navigator.userAgent); + const urlParsingNode = document.createElement('a'); + let originURL; + + /** + * Parse a URL to discover its components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + let href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; } - SearchClient.prototype.clearCache = function () { - this.multiSearch.clearCache(); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - Object.entries(this.individualCollections).forEach(function (_a) { - var _ = _a[0], collection = _a[1]; - collection.documents().clearCache(); - }); + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); }; - SearchClient.prototype.collections = function (collectionName) { - if (!collectionName) { - throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to " + - "be searched must be specified. Use Typesense.Client if you need to access the collection object."); - } - else { - if (this.individualCollections[collectionName] === undefined) { - this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration); - } - return this.individualCollections[collectionName]; - } + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; }; - return SearchClient; -}()); -exports["default"] = SearchClient; -//# sourceMappingURL=SearchClient.js.map + })(); -/***/ }), +function parseProtocol(url) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); + return match && match[1] || ''; +} -/***/ "./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js": -/*!**********************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; -"use strict"; + min = min !== undefined ? min : 1000; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SearchOnlyCollection = void 0; -var SearchOnlyDocuments_1 = __webpack_require__(/*! ./SearchOnlyDocuments */ "./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js"); -var SearchOnlyCollection = /** @class */ (function () { - function SearchOnlyCollection(name, apiCall, configuration) { - this.name = name; - this.apiCall = apiCall; - this.configuration = configuration; - this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration); + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; } - SearchOnlyCollection.prototype.documents = function () { - return this._documents; - }; - return SearchOnlyCollection; -}()); -exports.SearchOnlyCollection = SearchOnlyCollection; -//# sourceMappingURL=SearchOnlyCollection.js.map -/***/ }), + bytes[head] = chunkLength; + timestamps[head] = now; -/***/ "./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js": -/*!*********************************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js ***! - \*********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + let i = tail; + let bytesCount = 0; -"use strict"; + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SearchOnlyDocuments = void 0; -var RequestWithCache_1 = __importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var RESOURCEPATH = "/documents"; -var SearchOnlyDocuments = /** @class */ (function () { - function SearchOnlyDocuments(collectionName, apiCall, configuration) { - this.collectionName = collectionName; - this.apiCall = apiCall; - this.configuration = configuration; - this.requestWithCache = new RequestWithCache_1.default(); + + if (now - firstSampleTS < min) { + return; } - SearchOnlyDocuments.prototype.clearCache = function () { - this.requestWithCache.clearCache(); - }; - SearchOnlyDocuments.prototype.search = function (searchParameters, _a) { - var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration - .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d; - return __awaiter(this, void 0, void 0, function () { - var additionalQueryParams, key, queryParams; - return __generator(this, function (_e) { - additionalQueryParams = {}; - if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; - } - for (key in searchParameters) { - if (Array.isArray(searchParameters[key])) { - additionalQueryParams[key] = searchParameters[key].join(","); - } - } - queryParams = Object.assign({}, searchParameters, additionalQueryParams); - return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath("search"), queryParams, { abortSignal: abortSignal }], { - cacheResponseForSeconds: cacheSearchResultsForSeconds, - })]; - }); - }); - }; - SearchOnlyDocuments.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + + const passed = startedAt && now - startedAt; + + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; + }; +} + +function progressEventReducer(listener, isDownloadStream) { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + + return e => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + + bytesNotified = loaded; + + const data = { + loaded, + total, + progress: total ? (loaded / total) : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total && inRange ? (total - loaded) / rate : undefined, + event: e }; - Object.defineProperty(SearchOnlyDocuments, "RESOURCEPATH", { - get: function () { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return SearchOnlyDocuments; -}()); -exports.SearchOnlyDocuments = SearchOnlyDocuments; -//# sourceMappingURL=SearchOnlyDocuments.js.map -/***/ }), + data[isDownloadStream ? 'download' : 'upload'] = true; + + listener(data); + }; +} + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + +var xhrAdapter = isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let requestData = config.data; + const requestHeaders = AxiosHeaders$1.from(config.headers).normalize(); + let {responseType, withXSRFToken} = config; + let onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); + } + } + + let contentType; -/***/ "./node_modules/typesense/lib/Typesense/Synonym.js": -/*!*********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Synonym.js ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (utils$1.isFormData(requestData)) { + if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { + requestHeaders.setContentType(false); // Let the browser set it + } else if ((contentType = requestHeaders.getContentType()) !== false) { + // fix semicolon duplication issue for ReactNative FormData implementation + const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; + requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); + } + } -"use strict"; + let request = new XMLHttpRequest(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + // HTTP basic authentication + if (config.auth) { + const username = config.auth.username || ''; + const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password)); } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Synonyms_1 = __importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); -var Synonym = /** @class */ (function () { - function Synonym(collectionName, synonymId, apiCall) { - this.collectionName = collectionName; - this.synonymId = synonymId; - this.apiCall = apiCall; + + const fullPath = buildFullPath(config.baseURL, config.url); + + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + const responseHeaders = AxiosHeaders$1.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request + }; + + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; } - Synonym.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + + // Clean up request + request = null; }; - Synonym.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; - }); - }); + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request)); + + // Clean up request + request = null; }; - Synonym.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, "/").concat(this.synonymId); + + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; + const transitional = config.transitional || transitionalDefaults; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(new AxiosError( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, + config, + request)); + + // Clean up request + request = null; }; - return Synonym; -}()); -exports["default"] = Synonym; -//# sourceMappingURL=Synonym.js.map -/***/ }), + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if(platform.hasStandardBrowserEnv) { + withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config)); -/***/ "./node_modules/typesense/lib/Typesense/Synonyms.js": -/*!**********************************************************!*\ - !*** ./node_modules/typesense/lib/Typesense/Synonyms.js ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) { + // Add xsrf header + const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName); -"use strict"; + if (xsrfValue) { + requestHeaders.set(config.xsrfHeaderName, xsrfValue); + } + } + } -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add headers to the request + if ('setRequestHeader' in request) { + utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var RESOURCEPATH = "/synonyms"; -var Synonyms = /** @class */ (function () { - function Synonyms(collectionName, apiCall) { - this.collectionName = collectionName; - this.apiCall = apiCall; + + // Add withCredentials to request if needed + if (!utils$1.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; } - Synonyms.prototype.upsert = function (synonymId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)]; - }); - }); - }; - Synonyms.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Synonyms.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; - Object.defineProperty(Synonyms, "RESOURCEPATH", { - get: function () { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Synonyms; -}()); -exports["default"] = Synonyms; -//# sourceMappingURL=Synonyms.js.map -/***/ }), + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true)); + } -/***/ "?6884": -/*!************************!*\ - !*** crypto (ignored) ***! - \************************/ -/***/ (() => { + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress)); + } -/* (ignored) */ + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = cancel => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); + request.abort(); + request = null; + }; -/***/ }), + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + } + } -/***/ "./node_modules/@babel/runtime/helpers/regeneratorRuntime.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! - \*******************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + const protocol = parseProtocol(fullPath); -var _typeof = (__webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/typeof.js")["default"]); -function _regeneratorRuntime() { - "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ - module.exports = _regeneratorRuntime = function _regeneratorRuntime() { - return e; - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - var t, - e = {}, - r = Object.prototype, - n = r.hasOwnProperty, - o = Object.defineProperty || function (t, e, r) { - t[e] = r.value; - }, - i = "function" == typeof Symbol ? Symbol : {}, - a = i.iterator || "@@iterator", - c = i.asyncIterator || "@@asyncIterator", - u = i.toStringTag || "@@toStringTag"; - function define(t, e, r) { - return Object.defineProperty(t, e, { - value: r, - enumerable: !0, - configurable: !0, - writable: !0 - }), t[e]; - } - try { - define({}, ""); - } catch (t) { - define = function define(t, e, r) { - return t[e] = r; - }; - } - function wrap(t, e, r, n) { - var i = e && e.prototype instanceof Generator ? e : Generator, - a = Object.create(i.prototype), - c = new Context(n || []); - return o(a, "_invoke", { - value: makeInvokeMethod(t, r, c) - }), a; - } - function tryCatch(t, e, r) { - try { - return { - type: "normal", - arg: t.call(e, r) - }; - } catch (t) { - return { - type: "throw", - arg: t - }; + if (protocol && platform.protocols.indexOf(protocol) === -1) { + reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); + return; } - } - e.wrap = wrap; - var h = "suspendedStart", - l = "suspendedYield", - f = "executing", - s = "completed", - y = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var p = {}; - define(p, a, function () { - return this; + + + // Send the request + request.send(requestData || null); }); - var d = Object.getPrototypeOf, - v = d && d(d(values([]))); - v && v !== r && n.call(v, a) && (p = v); - var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); - function defineIteratorMethods(t) { - ["next", "throw", "return"].forEach(function (e) { - define(t, e, function (t) { - return this._invoke(e, t); - }); - }); - } - function AsyncIterator(t, e) { - function invoke(r, o, i, a) { - var c = tryCatch(t[r], t, o); - if ("throw" !== c.type) { - var u = c.arg, - h = u.value; - return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { - invoke("next", t, i, a); - }, function (t) { - invoke("throw", t, i, a); - }) : e.resolve(h).then(function (t) { - u.value = t, i(u); - }, function (t) { - return invoke("throw", t, i, a); - }); - } - a(c.arg); +}; + +const knownAdapters = { + http: httpAdapter, + xhr: xhrAdapter +}; + +utils$1.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, 'name', {value}); + } catch (e) { + // eslint-disable-next-line no-empty } - var r; - o(this, "_invoke", { - value: function value(t, n) { - function callInvokeWithMethodAndArg() { - return new e(function (e, r) { - invoke(t, n, e, r); - }); + Object.defineProperty(fn, 'adapterName', {value}); + } +}); + +const renderReason = (reason) => `- ${reason}`; + +const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false; + +var adapters = { + getAdapter: (adapters) => { + adapters = utils$1.isArray(adapters) ? adapters : [adapters]; + + const {length} = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; + + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + + adapter = nameOrAdapter; + + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new AxiosError(`Unknown adapter '${id}'`); } - return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } - }); - } - function makeInvokeMethod(e, r, n) { - var o = h; - return function (i, a) { - if (o === f) throw Error("Generator is already running"); - if (o === s) { - if ("throw" === i) throw a; - return { - value: t, - done: !0 - }; + + if (adapter) { + break; } - for (n.method = i, n.arg = a;;) { - var c = n.delegate; - if (c) { - var u = maybeInvokeDelegate(c, n); - if (u) { - if (u === y) continue; - return u; - } - } - if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { - if (o === h) throw o = s, n.arg; - n.dispatchException(n.arg); - } else "return" === n.method && n.abrupt("return", n.arg); - o = f; - var p = tryCatch(e, r, n); - if ("normal" === p.type) { - if (o = n.done ? s : l, p.arg === y) continue; - return { - value: p.arg, - done: n.done - }; - } - "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); + + rejectedReasons[id || '#' + i] = adapter; + } + + if (!adapter) { + + const reasons = Object.entries(rejectedReasons) + .map(([id, state]) => `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); + + let s = length ? + (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : + 'as no adapter specified'; + + throw new AxiosError( + `There is no suitable adapter to dispatch the request ` + s, + 'ERR_NOT_SUPPORT' + ); + } + + return adapter; + }, + adapters: knownAdapters +}; + +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new CanceledError(null, config); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +function dispatchRequest(config) { + throwIfCancellationRequested(config); + + config.headers = AxiosHeaders$1.from(config.headers); + + // Transform request data + config.data = transformData.call( + config, + config.transformRequest + ); + + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + + const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter); + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData.call( + config, + config.transformResponse, + response + ); + + response.headers = AxiosHeaders$1.from(response.headers); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders$1.from(reason.response.headers); } - }; + } + + return Promise.reject(reason); + }); +} + +const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + const config = {}; + + function getMergedValue(target, source, caseless) { + if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { + return utils$1.merge.call({caseless}, target, source); + } else if (utils$1.isPlainObject(source)) { + return utils$1.merge({}, source); + } else if (utils$1.isArray(source)) { + return source.slice(); + } + return source; } - function maybeInvokeDelegate(e, r) { - var n = r.method, - o = e.iterator[n]; - if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; - var i = tryCatch(o, e.iterator, r.arg); - if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; - var a = i.arg; - return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); + + // eslint-disable-next-line consistent-return + function mergeDeepProperties(a, b, caseless) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(a, b, caseless); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a, caseless); + } } - function pushTryEntry(t) { - var e = { - tryLoc: t[0] - }; - 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); + + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } } - function resetTryEntry(t) { - var e = t.completion || {}; - e.type = "normal", delete e.arg, t.completion = e; + + // eslint-disable-next-line consistent-return + function defaultToConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a); + } } - function Context(t) { - this.tryEntries = [{ - tryLoc: "root" - }], t.forEach(pushTryEntry, this), this.reset(!0); + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(a, b, prop) { + if (prop in config2) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(undefined, a); + } } - function values(e) { - if (e || "" === e) { - var r = e[a]; - if (r) return r.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) { - var o = -1, - i = function next() { - for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; - return next.value = t, next.done = !0, next; - }; - return i.next = i; + + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + }; + + utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { + const merge = mergeMap[prop] || mergeDeepProperties; + const configValue = merge(config1[prop], config2[prop], prop); + (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + }); + + return config; +} + +const VERSION = "1.6.8"; + +const validators$1 = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators$1[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +const deprecatedWarnings = {}; + +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators$1.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + AxiosError.ERR_DEPRECATED + ); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); } - throw new TypeError(_typeof(e) + " is not iterable"); } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { - value: GeneratorFunctionPrototype, - configurable: !0 - }), o(GeneratorFunctionPrototype, "constructor", { - value: GeneratorFunction, - configurable: !0 - }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { - var e = "function" == typeof t && t.constructor; - return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); - }, e.mark = function (t) { - return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; - }, e.awrap = function (t) { - return { - __await: t +} + +var validator = { + assertOptions, + validators: validators$1 +}; + +const validators = validator.validators; + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager$1(), + response: new InterceptorManager$1() }; - }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { - return this; - }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { - void 0 === i && (i = Promise); - var a = new AsyncIterator(wrap(t, r, n, o), i); - return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { - return t.done ? t.value : a.next(); - }); - }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { - return this; - }), define(g, "toString", function () { - return "[object Generator]"; - }), e.keys = function (t) { - var e = Object(t), - r = []; - for (var n in e) r.push(n); - return r.reverse(), function next() { - for (; r.length;) { - var t = r.pop(); - if (t in e) return next.value = t, next.done = !1, next; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) { + let dummy; + + Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); + + // slice off the Error: ... line + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; + + if (!err.stack) { + err.stack = stack; + // match without the 2 top stack lines + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { + err.stack += '\n' + stack; + } } - return next.done = !0, next; - }; - }, e.values = values, Context.prototype = { - constructor: Context, - reset: function reset(e) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); - }, - stop: function stop() { - this.done = !0; - var t = this.tryEntries[0].completion; - if ("throw" === t.type) throw t.arg; - return this.rval; - }, - dispatchException: function dispatchException(e) { - if (this.done) throw e; - var r = this; - function handle(n, o) { - return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; + + throw err; + } + } + + _request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = mergeConfig(this.defaults, config); + + const {transitional, paramsSerializer, headers} = config; + + if (transitional !== undefined) { + validator.assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean) + }, false); + } + + if (paramsSerializer != null) { + if (utils$1.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator.assertOptions(paramsSerializer, { + encode: validators.function, + serialize: validators.function + }, true); } - for (var o = this.tryEntries.length - 1; o >= 0; --o) { - var i = this.tryEntries[o], - a = i.completion; - if ("root" === i.tryLoc) return handle("end"); - if (i.tryLoc <= this.prev) { - var c = n.call(i, "catchLoc"), - u = n.call(i, "finallyLoc"); - if (c && u) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } else if (c) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - } else { - if (!u) throw Error("try statement without catch or finally"); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } - } + } + + // Set config.method + config.method = (config.method || this.defaults.method || 'get').toLowerCase(); + + // Flatten headers + let contextHeaders = headers && utils$1.merge( + headers.common, + headers[config.method] + ); + + headers && utils$1.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + (method) => { + delete headers[method]; } - }, - abrupt: function abrupt(t, e) { - for (var r = this.tryEntries.length - 1; r >= 0; --r) { - var o = this.tryEntries[r]; - if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { - var i = o; - break; - } + ); + + config.headers = AxiosHeaders$1.concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; } - i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); - var a = i ? i.completion : {}; - return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); - }, - complete: function complete(t, e) { - if ("throw" === t.type) throw t.arg; - return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; - }, - finish: function finish(t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + let promise; + let i = 0; + let len; + + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), undefined]; + chain.unshift.apply(chain, requestInterceptorChain); + chain.push.apply(chain, responseInterceptorChain); + len = chain.length; + + promise = Promise.resolve(config); + + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); } - }, - "catch": function _catch(t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.tryLoc === t) { - var n = r.completion; - if ("throw" === n.type) { - var o = n.arg; - resetTryEntry(r); - } - return o; - } + + return promise; + } + + len = requestInterceptorChain.length; + + let newConfig = config; + + i = 0; + + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected.call(this, error); + break; } - throw Error("illegal catch attempt"); - }, - delegateYield: function delegateYield(e, r, n) { - return this.delegate = { - iterator: values(e), - resultName: r, - nextLoc: n - }, "next" === this.method && (this.arg = t), y; } - }, e; -} -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; -/***/ }), + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + return Promise.reject(error); + } -/***/ "./node_modules/@babel/runtime/helpers/typeof.js": -/*!*******************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! - \*******************************************************/ -/***/ ((module) => { + i = 0; + len = responseInterceptorChain.length; -function _typeof(o) { - "@babel/helpers - typeof"; + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); + return promise; + } + + getUri(config) { + config = mergeConfig(this.defaults, config); + const fullPath = buildFullPath(config.baseURL, config.url); + return buildURL(fullPath, config.params, config.paramsSerializer); + } } -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; -/***/ }), +// Provide aliases for supported request methods +utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(mergeConfig(config || {}, { + method, + url, + data: (config || {}).data + })); + }; +}); -/***/ "./node_modules/@babel/runtime/regenerator/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@babel/runtime/regenerator/index.js ***! - \**********************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ -// TODO(Babel 8): Remove this file. + function generateHTTPMethod(isForm) { + return function httpMethod(url, data, config) { + return this.request(mergeConfig(config || {}, { + method, + headers: isForm ? { + 'Content-Type': 'multipart/form-data' + } : {}, + url, + data + })); + }; + } -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); -module.exports = runtime; + Axios.prototype[method] = generateHTTPMethod(); -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - if (typeof globalThis === "object") { - globalThis.regeneratorRuntime = runtime; - } else { - Function("r", "regeneratorRuntime = r")(runtime); + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); +}); + +var Axios$1 = Axios; + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + let resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + const token = this; + + // eslint-disable-next-line func-names + this.promise.then(cancel => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = onfulfilled => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise(resolve => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new CanceledError(message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel + }; + } +} + +var CancelToken$1 = CancelToken; + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +function isAxiosError(payload) { + return utils$1.isObject(payload) && (payload.isAxiosError === true); +} + +const HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, +}; + +Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; +}); + +var HttpStatusCode$1 = HttpStatusCode; + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new Axios$1(defaultConfig); + const instance = bind(Axios$1.prototype.request, context); + + // Copy axios.prototype to instance + utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true}); + + // Copy context to instance + utils$1.extend(instance, context, null, {allOwnKeys: true}); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; } +// Create the default instance to be exported +const axios = createInstance(defaults$1); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios$1; + +// Expose Cancel & CancelToken +axios.CanceledError = CanceledError; +axios.CancelToken = CancelToken$1; +axios.isCancel = isCancel; +axios.VERSION = VERSION; +axios.toFormData = toFormData; + +// Expose AxiosError class +axios.AxiosError = AxiosError; + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; + +axios.spread = spread; + +// Expose isAxiosError +axios.isAxiosError = isAxiosError; + +// Expose mergeConfig +axios.mergeConfig = mergeConfig; + +axios.AxiosHeaders = AxiosHeaders$1; + +axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); + +axios.getAdapter = adapters.getAdapter; + +axios.HttpStatusCode = HttpStatusCode$1; + +axios.default = axios; + +module.exports = axios; +//# sourceMappingURL=axios.cjs.map + /***/ }), @@ -7843,6 +9492,18 @@ function _unsupportedIterableToArray(o, minLen) { /******/ }; /******/ })(); /******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) diff --git a/dist/typesense-instantsearch-adapter.js.map b/dist/typesense-instantsearch-adapter.js.map index 65b52c1..86ffeee 100644 --- a/dist/typesense-instantsearch-adapter.js.map +++ b/dist/typesense-instantsearch-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense-instantsearch-adapter.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACVA,4FAAuC;;;;;;;;;;;ACA1B;;AAEb,YAAY,mBAAO,CAAC,qDAAY;AAChC,aAAa,mBAAO,CAAC,iEAAkB;AACvC,cAAc,mBAAO,CAAC,yEAAsB;AAC5C,eAAe,mBAAO,CAAC,2EAAuB;AAC9C,oBAAoB,mBAAO,CAAC,6EAAuB;AACnD,mBAAmB,mBAAO,CAAC,mFAA2B;AACtD,sBAAsB,mBAAO,CAAC,yFAA8B;AAC5D,kBAAkB,mBAAO,CAAC,yEAAqB;AAC/C,2BAA2B,mBAAO,CAAC,mFAA0B;AAC7D,aAAa,mBAAO,CAAC,mEAAkB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;ACnNa;;AAEb,YAAY,mBAAO,CAAC,kDAAS;AAC7B,WAAW,mBAAO,CAAC,gEAAgB;AACnC,YAAY,mBAAO,CAAC,4DAAc;AAClC,kBAAkB,mBAAO,CAAC,wEAAoB;AAC9C,eAAe,mBAAO,CAAC,8DAAY;;AAEnC;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,mBAAO,CAAC,kEAAiB;AACxC,oBAAoB,mBAAO,CAAC,4EAAsB;AAClD,iBAAiB,mBAAO,CAAC,sEAAmB;AAC5C,gBAAgB,uFAA6B;;AAE7C;AACA;AACA;AACA;AACA,eAAe,mBAAO,CAAC,oEAAkB;;AAEzC;AACA,qBAAqB,mBAAO,CAAC,gFAAwB;;AAErD;;AAEA;AACA,yBAAsB;;;;;;;;;;;;ACxDT;;AAEb;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AClBa;;AAEb,aAAa,mBAAO,CAAC,2DAAU;;AAE/B;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtHa;;AAEb;AACA;AACA;;;;;;;;;;;;ACJa;;AAEb,YAAY,mBAAO,CAAC,qDAAY;AAChC,eAAe,mBAAO,CAAC,yEAAqB;AAC5C,yBAAyB,mBAAO,CAAC,iFAAsB;AACvD,sBAAsB,mBAAO,CAAC,2EAAmB;AACjD,kBAAkB,mBAAO,CAAC,mEAAe;AACzC,gBAAgB,mBAAO,CAAC,2EAAsB;;AAE9C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;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AAa;AACpC,aAAa,mBAAO,CAAC,mEAAkB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;;;;;;;;;;ACtFa;;AAEb;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1Ca;;AAEb,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,2BAA2B;AAC3B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;AClGa;;AAEb,kBAAkB,mBAAO,CAAC,mEAAe;;AAEzC;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxBa;;AAEb,YAAY,mBAAO,CAAC,qDAAY;AAChC,eAAe,mBAAO,CAAC,+DAAa;;AAEpC;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,OAAO;AAClB,WAAW,gBAAgB;AAC3B,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;ACrBa;;AAEb,YAAY,mBAAO,CAAC,mDAAU;AAC9B,0BAA0B,mBAAO,CAAC,+FAAgC;AAClE,mBAAmB,mBAAO,CAAC,2EAAsB;AACjD,2BAA2B,mBAAO,CAAC,yEAAgB;;AAEnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,mBAAO,CAAC,iEAAiB;AACvC,IAAI;AACJ;AACA,cAAc,mBAAO,CAAC,kEAAkB;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;AClIa;;AAEb;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;;;;;;;;;;;ACFa;;AAEb;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACVa;;AAEb,YAAY,mBAAO,CAAC,qDAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrEa;;AAEb;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACba;;AAEb,YAAY,mBAAO,CAAC,qDAAY;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA2C;AAC3C,SAAS;;AAET;AACA,4DAA4D,wBAAwB;AACpF;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,kCAAkC;AAClC,gCAAgC,cAAc;AAC9C;AACA;AACA,KAAK;AACL;;;;;;;;;;;;ACpDa;;AAEb;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACba;;AAEb,YAAY,mBAAO,CAAC,qDAAY;;AAEhC;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;;;;;;;;;;;ACZa;;AAEb,YAAY,mBAAO,CAAC,qDAAY;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;ACnEa;;AAEb,YAAY,mBAAO,CAAC,mDAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;ACXa;;AAEb,YAAY,mBAAO,CAAC,qDAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;;AAElB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;ACpDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1Ba;;AAEb,cAAc,wFAA8B;;AAE5C;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACjFa;;AAEb,WAAW,mBAAO,CAAC,gEAAgB;;AAEnC;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,4BAA4B;AAC5B,MAAM;AACN;AACA,MAAM;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CAAO,UAAU;AAAA;AAAA;AAAA;AAAA,kGAAC;AAC1B,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA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BAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B,mBAAO,CAAC,4CAAO;AAC7C,eAAe,mBAAO,CAAC,wEAAU;AACjC,uCAAuC,mBAAO,CAAC,gGAAyB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,gFAAgF,kCAAkC;AAClH,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,wNAAwN;AACxN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,gEAAgE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,uCAAuC;AAC3G;AACA;AACA,oEAAoE,sIAAsI;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,6CAA6C;AACpH,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClYa;AACb;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAA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CAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,eAAe,mBAAO,CAAC,wEAAU;AACjC,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,iBAAiB,mBAAO,CAAC,sEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACjJa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACpEa;AACb;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,mBAAO,CAAC,yDAAU;AAC5C,eAAe,mBAAO,CAAC,wEAAU;AACjC;AACA;AACA;AACA;AACA;AACA,mCAAmC,0CAA0C;AAC7E,mCAAmC,0CAA0C;AAC7E,mCAAmC,mBAAmB,WAAW,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ia;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;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xF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,wEAAU;AACjC,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uGAAuG,aAAa,kBAAkB;AACtI,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA,2GAA2G,aAAa,kBAAkB;AAC1I;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,kCAAkC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B;AACnF;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB;AAC3E,oFAAoF,6BAA6B;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACxMa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AAC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aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACtEa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB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AAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJ+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;;ACF6E;AAC9D;AACf;AACA,eAAe,4EAA4B;AAC3C;AACA;AACA;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACXiD;AACY;AACY;AACtB;AACpC;AACf,SAAS,8DAAc,SAAS,oEAAoB,YAAY,0EAA0B,YAAY,+DAAe;AACrH;;;;;;;;;;;;;;;;;;;ACNuD;AACJ;AACsB;AAClB;AACxC;AACf,SAAS,iEAAiB,SAAS,+DAAe,SAAS,0EAA0B,SAAS,iEAAiB;AAC/G;;;;;;;;;;;;;;;;ACNkC;AACnB;AACf,kBAAkB,sDAAO;AACzB;AACA;AACA;AACA,oBAAoB,sDAAO;AAC3B;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVkC;AACS;AAC5B;AACf,UAAU,2DAAW;AACrB,qBAAqB,sD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A6B,GAAA;IAAAS,KAAA,EAED,SAAA8T,yBAAyBD,eAAe,EAAE;MACxC,IAAIA,eAAe,CAAC/P,KAAK,EAAE;QACzB,MAAM,IAAIvD,KAAK,IAAAwD,MAAA,CAAI8P,eAAe,CAACiB,IAAI,SAAA/Q,MAAA,CAAM8P,eAAe,CAAC/P,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAAC+P,eAAe,CAAC9F,IAAI,IAAI,CAAC8F,eAAe,CAACxB,YAAY,EAAE;QAC1D,MAAM,IAAI9R,KAAK,2BAAAwD,MAAA,CAA2B8P,eAAe,CAACiB,IAAI,SAAA/Q,MAAA,CAAM8P,eAAe,CAAC/P,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/adapters/xhr.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/axios.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/cancel/Cancel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/cancel/CancelToken.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/cancel/isCancel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/Axios.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/InterceptorManager.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/buildFullPath.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/createError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/dispatchRequest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/enhanceError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/mergeConfig.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/settle.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/transformData.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/defaults/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/defaults/transitional.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/env/data.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/bind.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/buildURL.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/combineURLs.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/cookies.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/spread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/validator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/utils.js","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/ignored|/Users/jason/Programming/jprojs/typesense/typesense-instantsearch-adapter/node_modules/typesense/lib/Typesense|crypto","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/webpack/runtime/make namespace object","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar transitionalDefaults = require('../defaults/transitional');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar enhanceError = require('../core/enhanceError');\nvar transitionalDefaults = require('./transitional');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","module.exports = {\n \"version\": \"0.26.1\"\n};","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return toString.call(val) === '[object FormData]';\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return toString.call(val) === '[object URLSearchParams]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (idOrQuery) {\n if (idOrQuery === void 0) { idOrQuery = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (typeof idOrQuery === \"string\") {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(idOrQuery), idOrQuery)];\n }\n else {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), idOrQuery)];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["_classCallCheck","_createClass","Configuration","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","Object","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","value","validate","values","some","c","console","warn","Error","utils","FacetSearchResponseAdapter","typesenseResponse","instantsearchRequest","_adaptFacetHits","typesenseFacetCounts","adaptedResult","facet","find","field_name","facetName","counts","map","facetCount","highlighted","_adaptHighlightTag","highlightPreTag","highlightPostTag","count","adapt","facetHits","facet_counts","exhaustiveFacetsCount","processingTimeMS","search_time_ms","assign","prototype","_objectWithoutProperties","_asyncToGenerator","_slicedToArray","_excluded","_regeneratorRuntime","SearchRequestAdapter","instantsearchRequests","typesenseClient","configuration","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","exactMatch","_adaptFacetFilters","facetFilters","transformedTypesenseFilters","item","Array","isArray","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","_this3$configuration$","_buildSearchParameters","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","q","query","facet_by","filter_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","get","_typeof","_toConsumableArray","_defineProperty","ownKeys","e","r","t","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread","getOwnPropertyDescriptors","defineProperties","defineProperty","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","_adaptGroupedHits","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","includes","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","attribute","matchLevel","matchedWords","highlights","matched_tokens","indices","k","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","index","indexOf","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","facetOrdering","order","Set","fc","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","isFinite","Math","ceil","SearchClient","TypesenseSearchClient","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","clearCache","search","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","sent","results","typesenseResult","_validateTypesenseResult","responseAdapter","adaptedResponse","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_callee2$","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","_x3","code","default"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense-instantsearch-adapter.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;ACVa;;AAAA;AAAA;AAEN,IAAME,aAAa;EACxB,SAAAA,cAAA,EAA0B;IAAA,IAAAC,qBAAA;MAAAC,qBAAA;MAAAC,IAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,qBAAA;MAAAC,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ACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC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gC,mBAAO,CAAC,oEAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACnEa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACtEa;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,kFAAkB;AACjE,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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C7D,8BAA8B,mBAAO,CAAC,0DAAO;AAC7C,eAAe,mBAAO,CAAC,wEAAU;AACjC,uCAAuC,mBAAO,CAAC,gGAAyB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,gFAAgF,kCAAkC;AAClH,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,wNAAwN;AACxN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,gEAAgE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,uCAAuC;AAC3G;AACA;AACA,oEAAoE,sIAAsI;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,6CAA6C;AACpH,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC1Ya;AACb;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,6BAA6B,mBAAO,CAAC,8DAAQ;AAC7C,4BAA4B,mBAAO,CAAC,4DAAO;AAC3C,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,qCAAqC,mBAAO,CAAC,8EAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACxHa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,eAAe,mBAAO,CAAC,wEAAU;AACjC,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,iBAAiB,mBAAO,CAAC,sEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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C,wEAAU;AACjC;AACA;AACA;AACA;AACA;AACA,mCAAmC,0CAA0C;AAC7E,mCAAmC,0CAA0C;AAC7E,mCAAmC,mBAAmB,WAAW,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ia;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SA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,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,wEAAU;AACjC,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uGAAuG,aAAa,kBAAkB;AACtI,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA,2GAA2G,aAAa,kBAAkB;AAC1I;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,kCAAkC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B;AACnF;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB;AAC3E,oFAAoF,6BAA6B;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClMa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,m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8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACtEa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA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YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;AC3EA;;;;;;;;;;ACAA,cAAc,sGAAiC;AAC/C;AACA,gBAAgB;AAChB;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;ACdA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;ACzrGe;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJ+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;;ACF6E;AAC9D;AACf;AACA,eAAe,4EAA4B;AAC3C;AACA;AACA;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACXiD;AACY;AACY;AACtB;AACpC;A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,IAAIqQ,mDAAqB,CAAC,IAAI,CAACpQ,aAAa,CAAClF,MAAM,CAAC;MAC3E,OAAO,IAAI,CAACyV,YAAY;IAC1B;EAAC;IAAA5T,GAAA;IAAAU,KAAA,EAED,SAAAiT,oBAAoB5V,OAAO,EAAE;MAC3B,IAAI,CAACsF,aAAa,GAAG,IAAI7G,yDAAa,CAACuB,OAAO,CAAC;MAC/C,IAAI,CAACsF,aAAa,CAAC1C,QAAQ,CAAC,CAAC;MAC7B,IAAI,CAACyC,eAAe,GAAG,IAAIqQ,mDAAqB,CAAC,IAAI,CAACpQ,aAAa,CAAClF,MAAM,CAAC;MAC3E,OAAO,IAAI;IACb;EAAC;IAAA6B,GAAA;IAAAU,KAAA,EAED,SAAA8T,yBAAyBD,eAAe,EAAE;MACxC,IAAIA,eAAe,CAAC/P,KAAK,EAAE;QACzB,MAAM,IAAIvD,KAAK,IAAAwD,MAAA,CAAI8P,eAAe,CAACiB,IAAI,SAAA/Q,MAAA,CAAM8P,eAAe,CAAC/P,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAAC+P,eAAe,CAAC9F,IAAI,IAAI,CAAC8F,eAAe,CAACxB,YAAY,EAAE;QAC1D,MAAM,IAAI9R,KAAK,2BAAAwD,MAAA,CAA2B8P,eAAe,CAACiB,IAAI,SAAA/Q,MAAA,CAAM8P,eAAe,CAAC/P,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/ignored|/Users/anthonybachour/typesense/local/typesense-instantsearch-adapter/node_modules/typesense/lib/Typesense|crypto","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/webpack/runtime/make namespace object","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false;\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][\">=\"] > filtersHash[field][\"<=\"]) {\n //exclude unbound range:\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["_classCallCheck","_createClass","Configuration","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","_options$useExcludeFo","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","Object","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","useExcludeForUnboundNumericRange","value","validate","values","some","c","console","warn","Error","utils","FacetSearchResponseAdapter","typesenseResponse","instantsearchRequest","_adaptFacetHits","typesenseFacetCounts","adaptedResult","facet","find","field_name","facetName","counts","map","facetCount","highlighted","_adaptHighlightTag","highlightPreTag","highlightPostTag","count","adapt","facetHits","facet_counts","exhaustiveFacetsCount","processingTimeMS","search_time_ms","assign","prototype","_objectWithoutProperties","_asyncToGenerator","_slicedToArray","_excluded","_regeneratorRuntime","SearchRequestAdapter","instantsearchRequests","typesenseClient","configuration","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","exactMatch","_adaptFacetFilters","facetFilters","transformedTypesenseFilters","item","Array","isArray","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","_this3$configuration$","_buildSearchParameters","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","q","query","facet_by","filter_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","get","_typeof","_toConsumableArray","_defineProperty","ownKeys","e","r","t","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread","getOwnPropertyDescriptors","defineProperties","defineProperty","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","_adaptGroupedHits","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","includes","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","attribute","matchLevel","matchedWords","highlights","matched_tokens","indices","k","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","index","indexOf","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","facetOrdering","order","Set","fc","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","isFinite","Math","ceil","SearchClient","TypesenseSearchClient","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","clearCache","search","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","sent","results","typesenseResult","_validateTypesenseResult","responseAdapter","adaptedResponse","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_callee2$","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","_x3","code","default"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/typesense-instantsearch-adapter.min.js b/dist/typesense-instantsearch-adapter.min.js index 0eb40e4..a473b1e 100644 --- a/dist/typesense-instantsearch-adapter.min.js +++ b/dist/typesense-instantsearch-adapter.min.js @@ -1,3 +1,3 @@ /*! For license information please see typesense-instantsearch-adapter.min.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TypesenseInstantSearchAdapter=e():t.TypesenseInstantSearchAdapter=e()}(self,(()=>(()=>{var t={2505:(t,e,n)=>{t.exports=n(8015)},5592:(t,e,n)=>{"use strict";var r=n(9516),o=n(7522),i=n(3948),a=n(9106),s=n(9615),u=n(2012),c=n(4202),l=n(7763),f=n(4896),h=n(1928);t.exports=function(t){return new Promise((function(e,n){var p,d=t.data,y=t.headers,v=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(d)&&delete y["Content-Type"];var b=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",_=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";y.Authorization="Basic "+btoa(m+":"+_)}var w=s(t.baseURL,t.url);function P(){if(b){var r="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:t,request:b};o((function(t){e(t),g()}),(function(t){n(t),g()}),i),b=null}}if(b.open(t.method.toUpperCase(),a(w,t.params,t.paramsSerializer),!0),b.timeout=t.timeout,"onloadend"in b?b.onloadend=P:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(P)},b.onabort=function(){b&&(n(l("Request aborted",t,"ECONNABORTED",b)),b=null)},b.onerror=function(){n(l("Network Error",t,null,b)),b=null},b.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||f;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},r.isStandardBrowserEnv()){var O=(t.withCredentials||c(w))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;O&&(y[t.xsrfHeaderName]=O)}"setRequestHeader"in b&&r.forEach(y,(function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete y[e]:b.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),v&&"json"!==v&&(b.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&b.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){b&&(n(!t||t&&t.type?new h("canceled"):t),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),d||(d=null),b.send(d)}))}},8015:(t,e,n)=>{"use strict";var r=n(9516),o=n(9012),i=n(5155),a=n(5343),s=function t(e){var n=new i(e),s=o(i.prototype.request,n);return r.extend(s,i.prototype,n),r.extend(s,n),s.create=function(n){return t(a(e,n))},s}(n(7412));s.Axios=i,s.Cancel=n(1928),s.CancelToken=n(3191),s.isCancel=n(3864),s.VERSION=n(9641).version,s.all=function(t){return Promise.all(t)},s.spread=n(7980),s.isAxiosError=n(5019),t.exports=s,t.exports.default=s},1928:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},3191:(t,e,n)=>{"use strict";var r=n(1928);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},5155:(t,e,n)=>{"use strict";var r=n(9516),o=n(9106),i=n(3471),a=n(4490),s=n(5343),u=n(4841),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new i,response:new i}}l.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=e.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,l=[];if(this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)})),!o){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(l),i=Promise.resolve(e);f.length;)i=i.then(f.shift(),f.shift());return i}for(var h=e;r.length;){var p=r.shift(),d=r.shift();try{h=p(h)}catch(t){d(t);break}}try{i=a(h)}catch(t){return Promise.reject(t)}for(;l.length;)i=i.then(l.shift(),l.shift());return i},l.prototype.getUri=function(t){return t=s(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(s(r||{},{method:t,url:e,data:n}))}})),t.exports=l},3471:(t,e,n)=>{"use strict";var r=n(9516);function o(){this.handlers=[]}o.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},9615:(t,e,n)=>{"use strict";var r=n(9137),o=n(4680);t.exports=function(t,e){return t&&!r(e)?o(t,e):e}},7763:(t,e,n)=>{"use strict";var r=n(5449);t.exports=function(t,e,n,o,i){var a=new Error(t);return r(a,e,n,o,i)}},4490:(t,e,n)=>{"use strict";var r=n(9516),o=n(2881),i=n(3864),a=n(7412),s=n(1928);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},5449:t=>{"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},5343:(t,e,n)=>{"use strict";var r=n(9516);t.exports=function(t,e){e=e||{};var n={};function o(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function i(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:o(void 0,t[n]):o(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return o(void 0,e[t])}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:o(void 0,t[n]):o(void 0,e[n])}function u(n){return n in e?o(t[n],e[n]):n in t?o(void 0,t[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||i,o=e(t);r.isUndefined(o)&&e!==u||(n[t]=o)})),n}},7522:(t,e,n)=>{"use strict";var r=n(7763);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},2881:(t,e,n)=>{"use strict";var r=n(9516),o=n(7412);t.exports=function(t,e,n){var i=this||o;return r.forEach(n,(function(n){t=n.call(i,t,e)})),t}},7412:(t,e,n)=>{"use strict";var r=n(9516),o=n(7018),i=n(5449),a=n(4896),s={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,l={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5592)),c),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(u(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||l.transitional,n=e&&e.silentJSONParsing,o=e&&e.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw i(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){l.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){l.headers[t]=r.merge(s)})),t.exports=l},4896:t=>{"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},9641:t=>{t.exports={version:"0.26.1"}},9012:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(9516);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},4680:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},3948:(t,e,n)=>{"use strict";var r=n(9516);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},9137:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},5019:(t,e,n)=>{"use strict";var r=n(9516);t.exports=function(t){return r.isObject(t)&&!0===t.isAxiosError}},4202:(t,e,n)=>{"use strict";var r=n(9516);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},7018:(t,e,n)=>{"use strict";var r=n(9516);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},2012:(t,e,n)=>{"use strict";var r=n(9516),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},7980:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4841:(t,e,n)=>{"use strict";var r=n(9641).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var i={};o.transitional=function(t,e,n){function o(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(o(r," has been removed"+(e?" in "+e:"")));return e&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),o=r.length;o-- >0;){var i=r[o],a=e[i];if(a){var s=t[i],u=void 0===s||a(s,i,t);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},9516:(t,e,n)=>{"use strict";var r=n(9012),o=Object.prototype.toString;function i(t){return Array.isArray(t)}function a(t){return void 0===t}function s(t){return"[object ArrayBuffer]"===o.call(t)}function u(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function l(t){return"[object Function]"===o.call(t)}function f(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var n=0,r=t.length;n=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(t){}}}(n),a.call(s,n,t),typeof console===e&&n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0},transformResponse:[function(t,e){var n=t;return void 0!==e&&"string"==typeof t&&e["content-type"]&&e["content-type"].startsWith("application/json")&&(n=JSON.parse(t)),n}]},!0!==w&&(b.timeout=1e3*h.connectionTimeoutSeconds),f&&0!==Object.keys(f).length&&(b.params=f),h.sendApiKeyAsQueryParam&&(b.params=b.params||{},b.params["x-typesense-api-key"]=h.apiKey),p&&("string"==typeof p&&0!==p.length||"object"==typeof p&&0!==Object.keys(p).length)&&(b.data=p),g&&(_=a.default.CancelToken,P=_.source(),v=function(){return P.cancel()},g.addEventListener("abort",v),b.cancelToken=P.token),[4,(0,a.default)(b)];case 2:if((O=o.sent()).status>=1&&O.status<=499&&h.setNodeHealthcheck(d,c),h.logger.debug("Request #".concat(n,": Request to Node ").concat(d.index," was made. Response Code was ").concat(O.status,".")),O.status>=200&&O.status<300)return[2,{value:Promise.resolve(O.data)}];if(O.status<500)return[2,{value:Promise.reject(h.customErrorForResponse(O,null===(i=O.data)||void 0===i?void 0:i.message))}];throw h.customErrorForResponse(O,null===(s=O.data)||void 0===s?void 0:s.message);case 3:return S=o.sent(),h.setNodeHealthcheck(d,!1),r=S,h.logger.warn("Request #".concat(n,": Request to Node ").concat(d.index,' failed due to "').concat(S.code," ").concat(S.message).concat(null==S.response?"":" - "+JSON.stringify(null===(u=S.response)||void 0===u?void 0:u.data),'"')),h.logger.warn("Request #".concat(n,": Sleeping for ").concat(h.retryIntervalSeconds,"s and then retrying request...")),[4,h.timer(h.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return g&&v&&g.removeEventListener("abort",v),[7];case 6:return[2]}}))},h=this,d=1,b.label=1;case 1:return d<=this.numRetriesPerRequest+1?[5,l(d)]:[3,4];case 2:if("object"==typeof(v=b.sent()))return[2,v.value];b.label=3;case 3:return d++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(r)]}}))}))},t.prototype.getNextNode=function(t){if(void 0===t&&(t=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(t,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(t,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(t,": Nodes Health: ").concat(this.nodes.map((function(t){return"Node ".concat(t.index," is ").concat(!0===t.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var e=this.nodes[0],n=0;n<=this.nodes.length;n++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(e=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(e,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(e.index)),e;return this.logger.debug("Request #".concat(t,": No healthy nodes were found. Returning the next node, Node ").concat(e.index)),e},t.prototype.nodeDueForHealthcheck=function(t,e){void 0===e&&(e=0);var n=Date.now()-t.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},t.prototype.initializeMetadataForNodes=function(){var t=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,c)),this.nodes.forEach((function(e,n){e.index=n,t.setNodeHealthcheck(e,c)}))},t.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},t.prototype.uriFor=function(t,e){return null!=e.url?"".concat(e.url).concat(t):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path).concat(t)},t.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},t.prototype.timer=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},t.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status);"string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e));var r=new u.default(n);return(r=400===t.status?new s.RequestMalformed(n):401===t.status?new s.RequestUnauthorized(n):404===t.status?new s.ObjectNotFound(n):409===t.status?new s.ObjectAlreadyExists(n):422===t.status?new s.ObjectUnprocessable(n):t.status>=500&&t.status<=599?new s.ServerError(n):new s.HTTPError(n)).httpStatus=t.status,r},t}();e.default=l},5641:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(7361)),s=r(n(2626)),u=r(n(612)),c=r(n(5300)),l=r(n(326)),f=r(n(2275)),h=r(n(3343)),p=r(n(657)),d=r(n(8231)),y=r(n(3684)),v=r(n(8621)),g=r(n(5156)),b=r(n(3777)),m=r(n(800)),_=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null!==(e=t.sendApiKeyAsQueryParam)&&void 0!==e&&e,this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new p.default(this.apiCall),this.health=new d.default(this.apiCall),this.operations=new y.default(this.apiCall),this.multiSearch=new v.default(this.apiCall,this.configuration),this._collections=new a.default(this.apiCall),this.individualCollections={},this._aliases=new u.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new g.default(this.apiCall),this.individualPresets={},this.analytics=new m.default(this.apiCall)}return t.prototype.collections=function(t){return void 0===t?this._collections:(void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.default(t,this.apiCall,this.configuration)),this.individualCollections[t])},t.prototype.aliases=function(t){return void 0===t?this._aliases:(void 0===this.individualAliases[t]&&(this.individualAliases[t]=new c.default(t,this.apiCall)),this.individualAliases[t])},t.prototype.keys=function(t){return void 0===t?this._keys:(void 0===this.individualKeys[t]&&(this.individualKeys[t]=new f.default(t,this.apiCall)),this.individualKeys[t])},t.prototype.presets=function(t){return void 0===t?this._presets:(void 0===this.individualPresets[t]&&(this.individualPresets[t]=new b.default(t,this.apiCall)),this.individualPresets[t])},t}();e.default=_},2626:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0;n--){var r=Math.floor(Math.random()*(n+1));e=[t[r],t[n]],t[n]=e[0],t[r]=e[1]}},t}();e.default=c},3343:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)throw new s.ImportError("".concat(o.length-i.length," documents imported successfully, ").concat(i.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,r]}}))}))},e.prototype.export=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t)]}))}))},e.prototype.exportStream=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t,{responseType:"stream"})]}))}))},e}(n(6124).SearchOnlyDocuments);e.default=u},2144:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8331:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.importResults=n,r}return o(e,t),e}(i(n(7796)).default);e.default=a},2426:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6731:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8280:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},2703:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8274:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6909:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},1081:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},7796:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.name=n.name,Object.setPrototypeOf(r,n.prototype),r}return r(e,t),e}(Error);e.default=o},4410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImportError=e.TypesenseError=e.ServerError=e.RequestUnauthorized=e.RequestMalformed=e.ObjectUnprocessable=e.ObjectNotFound=e.ObjectAlreadyExists=e.MissingConfigurationError=e.HTTPError=void 0;var o=r(n(2144));e.HTTPError=o.default;var i=r(n(2426));e.MissingConfigurationError=i.default;var a=r(n(6731));e.ObjectAlreadyExists=a.default;var s=r(n(8280));e.ObjectNotFound=s.default;var u=r(n(2703));e.ObjectUnprocessable=u.default;var c=r(n(8274));e.RequestMalformed=c.default;var l=r(n(6909));e.RequestUnauthorized=l.default;var f=r(n(1081));e.ServerError=f.default;var h=r(n(8331));e.ImportError=h.default;var p=r(n(7796));e.TypesenseError=p.default},8231:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]c&&(v=this.responseCache.keys().next().value,this.responseCache.delete(v)),this.responsePromiseCache.size>c&&(v=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(v)),[2,y]}}))}))},t}();e.default=i},8557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(8621)),s=n(7112),u=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null===(e=t.sendApiKeyAsQueryParam)||void 0===e||e,!0===t.sendApiKeyAsQueryParam&&(t.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),t.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return t.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(t){t[0],t[1].documents().clearCache()}))},t.prototype.collections=function(t){if(t)return void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.SearchOnlyCollection(t,this.apiCall,this.configuration)),this.individualCollections[t];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},t}();e.default=u},7112:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchOnlyCollection=void 0;var r=n(6124),o=function(){function t(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return t.prototype.documents=function(){return this._documents},t}();e.SearchOnlyCollection=o},6124:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{},4633:(t,e,n)=>{var r=n(3738).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,i=Object.create(o.prototype),a=new A(r||[]);return s(i,"_invoke",{value:R(t,n,a)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",v="suspendedYield",g="executing",b="completed",m={};function _(){}function w(){}function P(){}var O={};h(O,c,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(F([])));x&&x!==i&&a.call(x,c)&&(O=x);var C=P.prototype=_.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,i,s,u){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function R(t,n,r){var o=y;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=k(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?b:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=b,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},3738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:(t,e,n)=>{var r=n(4633)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e){for(var n=0;nC});var c=n(4756),l=n.n(c),f=function(){return u((function t(){var e,n,r,i,a,s,u,c,l,f,h,p,d,y,v,g,b,m,_,w,P=this,O=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.server=O.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(e=this.server.cacheSearchResultsForSeconds)&&void 0!==e?e:120,this.additionalSearchParameters=null!==(n=O.additionalSearchParameters)&&void 0!==n?n:{},this.additionalSearchParameters.query_by=null!==(r=null!==(i=this.additionalSearchParameters.queryBy)&&void 0!==i?i:this.additionalSearchParameters.query_by)&&void 0!==r?r:"",this.additionalSearchParameters.preset=null!==(a=null!==(s=this.additionalSearchParameters.preset)&&void 0!==s?s:this.additionalSearchParameters.preset)&&void 0!==a?a:"",this.additionalSearchParameters.sort_by=null!==(u=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==u?u:"",this.additionalSearchParameters.highlight_full_fields=null!==(l=null!==(f=this.additionalSearchParameters.highlightFullFields)&&void 0!==f?f:this.additionalSearchParameters.highlight_full_fields)&&void 0!==l?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=O.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=O.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=O.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=P.collectionSpecificSearchParameters[t];s.query_by=null!==(e=s.queryBy)&&void 0!==e?e:s.query_by,s.preset=null!==(n=s.preset)&&void 0!==n?n:s.preset,s.sort_by=null!==(r=s.sortBy)&&void 0!==r?r:s.sort_by,s.highlight_full_fields=null!==(o=null!==(i=null!==(a=s.highlightFullFields)&&void 0!==a?a:s.highlight_full_fields)&&void 0!==i?i:P.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:s.query_by,Object.keys(s).forEach((function(t){return void 0===s[t]?delete s[t]:{}}))})),this.renderingContent=O.renderingContent,this.flattenGroupedHits=null===(y=O.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=O.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(g=O.filterByOptions)&&void 0!==g?g:{},this.sortByOptions=null!==(b=O.sortByOptions)&&void 0!==b?b:{},this.collectionSpecificFacetByOptions=null!==(m=O.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(_=O.collectionSpecificFilterByOptions)&&void 0!==_?_:{},this.collectionSpecificSortByOptions=null!==(w=O.collectionSpecificSortByOptions)&&void 0!==w?w:{}}),[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(t){return t.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(t){return 0===(t.query_by||"").length&&0===(t.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])}(),h=n(8567);function p(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(r).join(",")));var o=Object.keys(r)[0],i=r[o].reduce((function(t,e){return e.startsWith("-")&&!n._isNumber(e)?t[0].push(e.substring(1)):t[1].push(e),t}),[[],[]]),a=v(i,2),s=a[0],u=a[1],c=[];if(u.length>0){var l=n._shouldUseExactMatchForField(o,e)?":=":":";c.push("".concat(o).concat(l,"[").concat(u.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}if(s.length>0){var f=n._shouldUseExactMatchForField(o,e)?":!=":":!";c.push("".concat(o).concat(f,"[").concat(s.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}return c.filter((function(t){return t})).join(" && ")}var h,p=n._parseFacetFilter(t),d=p.fieldName,y=p.fieldValue;if(y.startsWith("-")&&!n._isNumber(y)){var g=n._shouldUseExactMatchForField(d,e)?":!=":":!";h="".concat(d).concat(g,"[").concat(n._escapeFacetValue(y.substring(1)),"]")}else{var b=n._shouldUseExactMatchForField(d,e)?":=":":";h="".concat(d).concat(b,"[").concat(n._escapeFacetValue(y),"]")}return h})).join(" && "):r}},{key:"_parseFacetFilter",value:function(t){var e,n,r,o,i;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(r=t.match(n)))return{fieldName:o="".concat(r[1]),fieldValue:i="".concat(r[2])}}return n=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(r[1]).concat(r[2]),i="".concat(r[3])),{fieldName:o,fieldValue:i}}},{key:"_escapeFacetValue",value:function(t){return"boolean"==typeof t||"true"===t||"false"===t||this._isNumber(t)?t:"`".concat(t,"`")}},{key:"_isNumber",value:function(t){return Number.isInteger(t%1)||!!(t%1)}},{key:"_adaptNumericFilters",value:function(t){var e=this,n="";if(!t)return n;var r={};t.forEach((function(t){var n=e._parseNumericFilter(t),o=n.fieldName,i=n.operator,a=n.fieldValue;r[o]=r[o]||{},r[o][i]=a}));var o=[];return Object.keys(r).forEach((function(t){null!=r[t]["<="]&&null!=r[t][">="]?o.push("".concat(t,":=[").concat(r[t][">="],"..").concat(r[t]["<="],"]")):null!=r[t]["<="]?o.push("".concat(t,":<=").concat(r[t]["<="])):null!=r[t][">="]?o.push("".concat(t,":>=").concat(r[t][">="])):null!=r[t]["="]?o.push("".concat(t,":=").concat(r[t]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(r[t])))})),o.join(" && ")}},{key:"_parseNumericFilter",value:function(t){var e,n,r,o,i,a;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(r=t.match(n))){var u=v(r,4);return{fieldName:o=u[1],operator:i=u[2],fieldValue:a=u[3]}}}if(n=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var c=v(r,4);o=c[1],i=c[2],a=c[3]}return{fieldName:o,operator:i,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(t){var e=t.insideBoundingBox,n=t.aroundRadius,r=t.aroundLatLng,o=t.insidePolygon;if(e){var i,a,s,u;if(Array.isArray(e)){var c=v(e.flat(),4);i=c[0],a=c[1],s=c[2],u=c[3]}else{var l=v(e.split(","),4);i=l[0],a=l[1],s=l[2],u=l[3]}return"".concat(this.configuration.geoLocationField,":(").concat(i,", ").concat(a,", ").concat(i,", ").concat(u,", ").concat(s,", ").concat(u,", ").concat(s,", ").concat(a,")")}if(r||n){if(!n||"all"===n)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var f="".concat(parseFloat(n)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(r,", ").concat(f,")")}if(o){var h=o;return Array.isArray(o)&&(h=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(h,")")}}},{key:"_adaptFilters",value:function(t,e){var n=[];return t.filters&&n.push(t.filters),n.push(this._adaptFacetFilters(t.facetFilters,e)),n.push(this._adaptNumericFilters(t.numericFilters)),n.push(this._adaptGeoFilter(t)),n.filter((function(t){return t&&""!==t})).join(" && ")}},{key:"_adaptIndexName",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(t,e){var n=this;return[t].flat().map((function(t){var r;return null!==(r=n.configuration.collectionSpecificFacetByOptions)&&void 0!==r&&null!==(r=r[e])&&void 0!==r&&r[t]?"".concat(t).concat(n.configuration.collectionSpecificFacetByOptions[e][t]):n.configuration.facetByOptions[t]?"".concat(t).concat(n.configuration.facetByOptions[t]):t})).join(",")}},{key:"_buildSearchParameters",value:function(t){for(var e,n,r=t.params,o=t.indexName,i=this._adaptIndexName(o),a={},s=0,u=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]);var t}();function m(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w={_adaptHighlightTag:function(t,e,n){return t.replace(new RegExp("","g"),e||"").replace(new RegExp("","g"),n||"")},_adaptNumberOfPages:function(){var t=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(t)?Math.ceil(t):1}};function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n,this.configuration=r,this.allTypesenseResults=i,this.fullTypesenseResponse=a}),[{key:"_adaptGroupedHits",value:function(t){var e=this,n=[];return n=t.map((function(t){var n=e._adaptHits(t.hits);return n.forEach((function(e){e.group_key=e._group_key=t.group_key,t.found&&(e._group_found=t.found)})),n})),this.configuration.flattenGroupedHits?n.flat():n.map((function(t){return O(O({},t[0]),{},{_grouped_hits:t})}))}},{key:"_adaptHits",value:function(t){var e=this;return t.map((function(t){var n=O({},t.document);n.objectID=t.document.id,n._snippetResult=e._adaptHighlightResult(t,"snippet"),n._highlightResult=e._adaptHighlightResult(t,"value"),n._rawTypesenseHit=t,e.fullTypesenseResponse.conversation&&(n._rawTypesenseConversation=e.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(e){Object.keys(t).includes(e)&&!Object.keys(n).includes(e)&&(n[e]=t[e])}));var r=n[e.configuration.geoLocationField];return r&&(n._geoloc={lat:r[0],lng:r[1]}),n}))}},{key:"_adaptHighlightResult",value:function(t,e){var n={};return null!=t.highlight&&this.isHighlightPost0240RCN32Format(t.highlight)?this.adaptHighlightObject(t,n,e):this.adaptHighlightsArray(t,n,e),n}},{key:"isHighlightPost0240RCN32Format",value:function(t){return null==t.full&&null==t.snippet}},{key:"adaptHighlightsArray",value:function(t,e,n){var r=this;Object.assign.apply(Object,[e].concat(m(Object.entries(t.document).map((function(t){var e=v(t,2);return _({},e[0],{value:e[1],matchLevel:"none",matchedWords:[]})}))))),t.highlights.forEach((function(t){e[t.field]={value:t[n]||t["".concat(n,"s")],matchLevel:"full",matchedWords:t.matched_tokens},t.indices&&(e[t.field].matchedIndices=t.indices)})),Object.entries(e).forEach((function(o){var a=v(o,2),s=a[0],u=a[1],c=s,l=u.value,f=u.matchLevel,h=u.matchedWords,p=u.matchedIndices;null==l?e[c]=r._adaptHighlightNullValue():Array.isArray(l)?(e[c]=[],t.document[c].forEach((function(t,o){p&&p.includes(o)?e[c].push({value:r._adaptHighlightTag("".concat(l[p.indexOf(o)]),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag),matchLevel:f,matchedWords:h[o]}):"object"===i(t)?e[c].push(r._adaptHighlightInObjectValue(t,{},n)):e[c].push({value:"".concat(t),matchLevel:"none",matchedWords:[]})}))):"object"===i(l)?e[c]=r._adaptHighlightInObjectValue(l,{},n):e[c].value=r._adaptHighlightTag("".concat(l),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(t,e,n){Object.assign(e,this._adaptHighlightInObjectValue(t.document,t.highlight,n))}},{key:"_adaptHighlightInObjectValue",value:function(t,e,n){var r=this;return Object.assign.apply(Object,[{}].concat(m(Object.entries(t).map((function(t){var o,a=v(t,2),s=a[0],u=a[1];if(null==u)o=r._adaptHighlightNullValue();else if(Array.isArray(u)){var c;o=r._adaptHighlightInArrayValue(u,null!==(c=null==e?void 0:e[s])&&void 0!==c?c:[],n)}else if("object"===i(u)){var l;o=r._adaptHighlightInObjectValue(u,null!==(l=null==e?void 0:e[s])&&void 0!==l?l:{},n)}else o=r._adaptHighlightInPrimitiveValue(u,null==e?void 0:e[s],n);return _({},s,o)})))))}},{key:"_adaptHighlightInArrayValue",value:function(t,e,n){var r=this;return t.map((function(t,o){var a;if(null==t)a=r._adaptHighlightNullValue();else if(Array.isArray(t)){var s;a=r._adaptHighlightInArrayValue(t,null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],n)}else if("object"===i(t)){var u;a=r._adaptHighlightInObjectValue(t,null!==(u=null==e?void 0:e[o])&&void 0!==u?u:{},n)}else a=r._adaptHighlightInPrimitiveValue(t,null==e?void 0:e[o],n);return a}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(t,e,n){var r,o;return null!=e?{value:this._adaptHighlightTag("".concat(null!==(r=null!==(o=e[n])&&void 0!==o?o:e.highlight)&&void 0!==r?r:e.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(e.matched_tokens||[]).length>0?"full":"none",matchedWords:e.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(t),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(t){var e={};return t.forEach((function(t){Object.assign(e,_({},t.field_name,Object.assign.apply(Object,[{}].concat(m(t.counts.map((function(t){return _({},t.value,t.count)})))))))})),e}},{key:"_adaptFacetStats",value:function(t){var e={};return t.forEach((function(t){Object.keys(t.stats).length>0&&Object.assign(e,_({},t.field_name,t.stats))})),e}},{key:"_adaptRenderingContent",value:function(t){var e,n=Object.assign({},this.configuration.renderingContent);return null==(null===(e=n.facetOrdering)||void 0===e||null===(e=e.facets)||void 0===e?void 0:e.order)&&(n.facetOrdering=n.facetOrdering||{},n.facetOrdering.facets=n.facetOrdering.facets||{},n.facetOrdering.facets.order=m(new Set(t.map((function(t){return t.field_name})).concat(this.allTypesenseResults.map((function(t){return t.facet_counts||[]})).flat().map((function(t){return t.field_name})).filter((function(t){return t})))))),n}},{key:"adapt",value:function(){var t=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),e=O({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(t).length>0?{renderingContent:t}:null);return this.fullTypesenseResponse.conversation&&0===e.hits.length&&(e.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),e}}])}();Object.assign(S.prototype,w);var x=function(){return u((function t(e,n){o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n}),[{key:"_adaptFacetHits",value:function(t){var e=this;return t.find((function(t){return t.field_name===e.instantsearchRequest.params.facetName})).counts.map((function(t){return{value:t.value,highlighted:e._adaptHighlightTag(t.highlighted,e.instantsearchRequest.params.highlightPreTag,e.instantsearchRequest.params.highlightPostTag),count:t.count}}))}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])}();Object.assign(x.prototype,w);var C=function(){return u((function t(e){var n=this;o(this,t),this.updateConfiguration(e),this.searchClient={clearCache:function(){return n.clearCache()},search:function(t){return n.searchTypesenseAndAdapt(t)},searchForFacetValues:function(t){return n.searchTypesenseForFacetValuesAndAdapt(t)}}}),[{key:"searchTypesenseAndAdapt",value:(r=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,r){return o._validateTypesenseResult(t),new S(t,e[r],o.configuration,n.results,n).adapt()})),t.abrupt("return",{results:r});case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return r.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(n=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,n){return o._validateTypesenseResult(t),new x(t,e[n],o.configuration).adapt()})),t.abrupt("return",r);case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return n.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(t=e(l().mark((function t(e){var n,r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new b(e,this.typesenseClient,this.configuration),t.next=3,n.request();case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new h.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(t){return this.configuration=new f(t),this.configuration.validate(),this.typesenseClient=new h.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(t){if(t.error)throw new Error("".concat(t.code," - ").concat(t.error));if(!t.hits&&!t.grouped_hits)throw new Error("Did not find any hits. ".concat(t.code," - ").concat(t.error))}}]);var t,n,r}()})(),r.default})())); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TypesenseInstantSearchAdapter=e():t.TypesenseInstantSearchAdapter=e()}(self,(()=>(()=>{var t={3065:function(t,e,n){var r,o;!function(i,a){"use strict";r=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(e,n){for(var o=0;o=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(t){}}}(n),a.call(s,n,t),typeof console===e&&n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0},transformResponse:[function(t,e){var n=t;return void 0!==e&&"string"==typeof t&&e["content-type"]&&e["content-type"].startsWith("application/json")&&(n=JSON.parse(t)),n}]},!0!==_&&(g.timeout=1e3*h.connectionTimeoutSeconds),f&&0!==Object.keys(f).length&&(g.params=f),h.sendApiKeyAsQueryParam&&(g.params=g.params||{},g.params["x-typesense-api-key"]=h.apiKey),h.configuration.httpAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpAgent")),g.httpAgent=h.configuration.httpAgent),h.configuration.httpsAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpsAgent")),g.httpsAgent=h.configuration.httpsAgent),p&&("string"==typeof p&&0!==p.length||"object"==typeof p&&0!==Object.keys(p).length)&&(g.data=p),b&&(w=a.default.CancelToken,O=w.source(),v=function(){return O.cancel()},b.addEventListener("abort",v),g.cancelToken=O.token),[4,(0,a.default)(g)];case 2:if((S=o.sent()).status>=1&&S.status<=499&&h.setNodeHealthcheck(d,c),h.logger.debug("Request #".concat(n,": Request to Node ").concat(d.index," was made. Response Code was ").concat(S.status,".")),S.status>=200&&S.status<300)return[2,{value:Promise.resolve(S.data)}];if(S.status<500)return[2,{value:Promise.reject(h.customErrorForResponse(S,null===(i=S.data)||void 0===i?void 0:i.message))}];throw h.customErrorForResponse(S,null===(s=S.data)||void 0===s?void 0:s.message);case 3:return P=o.sent(),h.setNodeHealthcheck(d,!1),r=P,h.logger.warn("Request #".concat(n,": Request to Node ").concat(d.index,' failed due to "').concat(P.code," ").concat(P.message).concat(null==P.response?"":" - "+JSON.stringify(null===(u=P.response)||void 0===u?void 0:u.data),'"')),h.logger.warn("Request #".concat(n,": Sleeping for ").concat(h.retryIntervalSeconds,"s and then retrying request...")),[4,h.timer(h.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return b&&v&&b.removeEventListener("abort",v),[7];case 6:return[2]}}))},h=this,d=1,g.label=1;case 1:return d<=this.numRetriesPerRequest+1?[5,l(d)]:[3,4];case 2:if("object"==typeof(v=g.sent()))return[2,v.value];g.label=3;case 3:return d++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(r)]}}))}))},t.prototype.getNextNode=function(t){if(void 0===t&&(t=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(t,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(t,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(t,": Nodes Health: ").concat(this.nodes.map((function(t){return"Node ".concat(t.index," is ").concat(!0===t.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var e=this.nodes[0],n=0;n<=this.nodes.length;n++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(e=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(e,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(e.index)),e;return this.logger.debug("Request #".concat(t,": No healthy nodes were found. Returning the next node, Node ").concat(e.index)),e},t.prototype.nodeDueForHealthcheck=function(t,e){void 0===e&&(e=0);var n=Date.now()-t.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},t.prototype.initializeMetadataForNodes=function(){var t=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,c)),this.nodes.forEach((function(e,n){e.index=n,t.setNodeHealthcheck(e,c)}))},t.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},t.prototype.uriFor=function(t,e){return null!=e.url?"".concat(e.url).concat(t):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path).concat(t)},t.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},t.prototype.timer=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},t.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status);"string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e));var r=new u.default(n);return(r=400===t.status?new s.RequestMalformed(n):401===t.status?new s.RequestUnauthorized(n):404===t.status?new s.ObjectNotFound(n):409===t.status?new s.ObjectAlreadyExists(n):422===t.status?new s.ObjectUnprocessable(n):t.status>=500&&t.status<=599?new s.ServerError(n):new s.HTTPError(n)).httpStatus=t.status,r},t}();e.default=l},5641:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(7361)),s=r(n(2626)),u=r(n(612)),c=r(n(5300)),l=r(n(326)),f=r(n(2275)),h=r(n(3343)),p=r(n(657)),d=r(n(8231)),y=r(n(3684)),v=r(n(8621)),b=r(n(5156)),g=r(n(3777)),m=r(n(800)),w=r(n(3533)),_=r(n(4646)),O=r(n(8700)),S=r(n(8313)),P=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null!==(e=t.sendApiKeyAsQueryParam)&&void 0!==e&&e,this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new p.default(this.apiCall),this.health=new d.default(this.apiCall),this.operations=new y.default(this.apiCall),this.multiSearch=new v.default(this.apiCall,this.configuration),this._collections=new a.default(this.apiCall),this.individualCollections={},this._aliases=new u.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new b.default(this.apiCall),this.individualPresets={},this._stopwords=new w.default(this.apiCall),this.individualStopwords={},this.analytics=new m.default(this.apiCall),this._conversations=new O.default(this.apiCall),this.individualConversations={}}return t.prototype.collections=function(t){return void 0===t?this._collections:(void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.default(t,this.apiCall,this.configuration)),this.individualCollections[t])},t.prototype.aliases=function(t){return void 0===t?this._aliases:(void 0===this.individualAliases[t]&&(this.individualAliases[t]=new c.default(t,this.apiCall)),this.individualAliases[t])},t.prototype.keys=function(t){return void 0===t?this._keys:(void 0===this.individualKeys[t]&&(this.individualKeys[t]=new f.default(t,this.apiCall)),this.individualKeys[t])},t.prototype.presets=function(t){return void 0===t?this._presets:(void 0===this.individualPresets[t]&&(this.individualPresets[t]=new g.default(t,this.apiCall)),this.individualPresets[t])},t.prototype.stopwords=function(t){return void 0===t?this._stopwords:(void 0===this.individualStopwords[t]&&(this.individualStopwords[t]=new _.default(t,this.apiCall)),this.individualStopwords[t])},t.prototype.conversations=function(t){return void 0===t?this._conversations:(void 0===this.individualConversations[t]&&(this.individualConversations[t]=new S.default(t,this.apiCall)),this.individualConversations[t])},t}();e.default=P},2626:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0;n--){var r=Math.floor(Math.random()*(n+1));e=[t[r],t[n]],t[n]=e[0],t[r]=e[1]}},t}();e.default=c},8313:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)throw new s.ImportError("".concat(o.length-i.length," documents imported successfully, ").concat(i.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,r]}}))}))},e.prototype.export=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t)]}))}))},e.prototype.exportStream=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t,{responseType:"stream"})]}))}))},e}(n(6124).SearchOnlyDocuments);e.default=u},2144:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8331:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.importResults=n,r}return o(e,t),e}(i(n(7796)).default);e.default=a},2426:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6731:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8280:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},2703:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8274:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6909:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},1081:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},7796:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.name=n.name,Object.setPrototypeOf(r,n.prototype),r}return r(e,t),e}(Error);e.default=o},4410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImportError=e.TypesenseError=e.ServerError=e.RequestUnauthorized=e.RequestMalformed=e.ObjectUnprocessable=e.ObjectNotFound=e.ObjectAlreadyExists=e.MissingConfigurationError=e.HTTPError=void 0;var o=r(n(2144));e.HTTPError=o.default;var i=r(n(2426));e.MissingConfigurationError=i.default;var a=r(n(6731));e.ObjectAlreadyExists=a.default;var s=r(n(8280));e.ObjectNotFound=s.default;var u=r(n(2703));e.ObjectUnprocessable=u.default;var c=r(n(8274));e.RequestMalformed=c.default;var l=r(n(6909));e.RequestUnauthorized=l.default;var f=r(n(1081));e.ServerError=f.default;var h=r(n(8331));e.ImportError=h.default;var p=r(n(7796));e.TypesenseError=p.default},8231:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]c&&(v=this.responseCache.keys().next().value,this.responseCache.delete(v)),this.responsePromiseCache.size>c&&(v=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(v)),[2,y]}}))}))},t}();e.default=i},8557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(8621)),s=n(7112),u=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null===(e=t.sendApiKeyAsQueryParam)||void 0===e||e,!0===t.sendApiKeyAsQueryParam&&(t.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),t.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return t.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(t){t[0],t[1].documents().clearCache()}))},t.prototype.collections=function(t){if(t)return void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.SearchOnlyCollection(t,this.apiCall,this.configuration)),this.individualCollections[t];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},t}();e.default=u},7112:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchOnlyCollection=void 0;var r=n(6124),o=function(){function t(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return t.prototype.documents=function(){return this._documents},t}();e.SearchOnlyCollection=o},6124:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{},4633:(t,e,n)=>{var r=n(3738).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new N(r||[]);return s(i,"_invoke",{value:j(t,n,a)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",v="suspendedYield",b="executing",g="completed",m={};function w(){}function _(){}function O(){}var S={};h(S,c,(function(){return this}));var P=Object.getPrototypeOf,E=P&&P(P(F([])));E&&E!==i&&a.call(E,c)&&(S=E);var C=O.prototype=w.prototype=Object.create(S);function x(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(o,i,s,u){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var o=y;return function(i,a){if(o===b)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=T(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=b;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},3738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:(t,e,n)=>{var r=n(4633)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6425:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(s=Object.create(null),t=>{const e=o.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const u=t=>(t=t.toLowerCase(),e=>a(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,f=c("undefined"),h=u("ArrayBuffer"),p=c("string"),d=c("function"),y=c("number"),v=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=u("Date"),m=u("File"),w=u("Blob"),_=u("FileList"),O=u("URLSearchParams");function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,o=t.length;r0;)if(r=n[o],e===r.toLowerCase())return r;return null}const E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,C=t=>!f(t)&&t!==E,x=(R="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>R&&t instanceof R);var R;const j=u("HTMLFormElement"),T=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),k=u("RegExp"),A=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};S(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},N="abcdefghijklmnopqrstuvwxyz",F="0123456789",M={DIGIT:F,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+F},U=u("AsyncFunction");var q={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:b,isUndefined:f,isDate:g,isFile:m,isBlob:w,isRegExp:k,isFunction:d,isStream:t=>v(t)&&d(t.pipe),isURLSearchParams:O,isTypedArray:x,isFileList:_,forEach:S,merge:function t(){const{caseless:e}=C(this)&&this||{},n={},r=(r,o)=>{const i=e&&P(n,o)||o;b(n[i])&&b(r)?n[i]=t(n[i],r):b(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t(S(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)s=o[a],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:A,freezeMethods:t=>{A(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:P,global:E,isContextDefined:C,ALPHABET:M,generateString:(t=16,e=M.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=l(t)?[]:{};return S(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:U,isThenable:t=>t&&(v(t)||d(t))&&d(t.then)&&d(t.catch)};function H(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}q.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const L=H.prototype,D={};function I(t){return q.isPlainObject(t)||q.isArray(t)}function B(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function G(t,e,n){return t?t.concat(e).map((function(t,e){return t=B(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{D[t]={value:t}})),Object.defineProperties(H,D),Object.defineProperty(L,"isAxiosError",{value:!0}),H.from=(t,e,n,r,o,i)=>{const a=Object.create(L);return q.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),H.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const V=q.toFlatObject(q,{},null,(function(t){return/^is[A-Z]/.test(t)}));function W(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!q.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(q.isDate(t))return t.toISOString();if(!s&&q.isBlob(t))throw new H("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(t)||q.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,o){let s=t;if(t&&!o&&"object"==typeof t)if(q.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(q.isArray(t)&&function(t){return q.isArray(t)&&!t.some(I)}(t)||(q.isFileList(t)||q.endsWith(n,"[]"))&&(s=q.toArray(t)))return n=B(n),s.forEach((function(t,r){!q.isUndefined(t)&&null!==t&&e.append(!0===a?G([n],r,i):null===a?n:n+"[]",u(t))})),!1;return!!I(t)||(e.append(G(o,n,i),u(t)),!1)}const l=[],f=Object.assign(V,{defaultVisitor:c,convertValue:u,isVisitable:I});if(!q.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!q.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),q.forEach(n,(function(n,i){!0===(!(q.isUndefined(n)||null===n)&&o.call(e,n,q.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function K(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function z(t,e){this._pairs=[],t&&W(t,this,e)}const J=z.prototype;function Q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||Q,o=n&&n.serialize;let i;if(i=o?o(e,n):q.isURLSearchParams(e)?e.toString():new z(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}J.append=function(t,e){this._pairs.push([t,e])},J.toString=function(t){const e=t?function(e){return t.call(this,e,K)}:K;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var $=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const tt="undefined"!=typeof window&&"undefined"!=typeof document,et=(nt="undefined"!=typeof navigator&&navigator.product,tt&&["ReactNative","NativeScript","NS"].indexOf(nt)<0);var nt;const rt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ot={...Object.freeze({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:rt,hasStandardBrowserEnv:et}),...Z};function it(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&q.isArray(r)?r.length:i,s?(q.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&q.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&q.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r{e(function(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const at={transitional:Y,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return r?JSON.stringify(it(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return W(t,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return ot.isNode&&q.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return W(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(q.isString(t))try{return(0,JSON.parse)(t),q.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||at.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&q.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw H.from(t,H.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],(t=>{at.headers[t]={}}));var st=at;const ut=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ct=Symbol("internals");function lt(t){return t&&String(t).trim().toLowerCase()}function ft(t){return!1===t||null==t?t:q.isArray(t)?t.map(ft):String(t)}function ht(t,e,n,r,o){return q.isFunction(r)?r.call(this,e,n):(o&&(e=n),q.isString(e)?q.isString(r)?-1!==e.indexOf(r):q.isRegExp(r)?r.test(e):void 0:void 0)}class pt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=lt(e);if(!o)throw new Error("header name must be a non-empty string");const i=q.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=ft(t))}const i=(t,e)=>q.forEach(t,((t,n)=>o(t,n,e)));return q.isPlainObject(t)||t instanceof this.constructor?i(t,e):q.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&ut[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=lt(t)){const n=q.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(q.isFunction(e))return e.call(this,t,n);if(q.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=lt(t)){const n=q.findKey(this,t);return!(!n||void 0===this[n]||e&&!ht(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=lt(t)){const o=q.findKey(n,t);!o||e&&!ht(0,n[o],o,e)||(delete n[o],r=!0)}}return q.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!ht(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return q.forEach(this,((r,o)=>{const i=q.findKey(n,o);if(i)return e[i]=ft(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=ft(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return q.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&q.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ct]=this[ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=lt(t);e[r]||(function(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return q.isArray(t)?t.forEach(r):r(t),this}}pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(pt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),q.freezeMethods(pt);var dt=pt;function yt(t,e){const n=this||st,r=e||n,o=dt.from(r.headers);let i=r.data;return q.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function vt(t){return!(!t||!t.__CANCEL__)}function bt(t,e,n){H.call(this,null==t?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(bt,H,{__CANCEL__:!0});var gt=ot.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),q.isString(r)&&a.push("path="+r),q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var wt=ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=q.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function _t(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Ot={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=dt.from(t.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(q.isFormData(r))if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=mt(t.baseURL,t.url);function h(){if(!l)return;const r=dt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),c()}),(function(t){n(t),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new H("Request aborted",H.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new H("Network Error",H.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Y;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new H(e,r.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,l)),l=null},ot.hasStandardBrowserEnv&&(u&&q.isFunction(u)&&(u=u(t)),u||!1!==u&&wt(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&>.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&q.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),q.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",_t(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new bt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);p&&-1===ot.protocols.indexOf(p)?n(new H("Unsupported protocol "+p+":",H.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};q.forEach(Ot,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St=t=>`- ${t}`,Pt=t=>q.isFunction(t)||null===t||!1===t;var Et=t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new H("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(St).join("\n"):" "+St(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ct(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new bt(null,t)}function xt(t){return Ct(t),t.headers=dt.from(t.headers),t.data=yt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Et(t.adapter||st.adapter)(t).then((function(e){return Ct(t),e.data=yt.call(t,t.transformResponse,e),e.headers=dt.from(e.headers),e}),(function(e){return vt(e)||(Ct(t),e&&e.response&&(e.response.data=yt.call(t,t.transformResponse,e.response),e.response.headers=dt.from(e.response.headers))),Promise.reject(e)}))}const Rt=t=>t instanceof dt?{...t}:t;function jt(t,e){e=e||{};const n={};function r(t,e,n){return q.isPlainObject(t)&&q.isPlainObject(e)?q.merge.call({caseless:n},t,e):q.isPlainObject(e)?q.merge({},e):q.isArray(e)?e.slice():e}function o(t,e,n){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!q.isUndefined(e))return r(void 0,e)}function a(t,e){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=u[r]||o,a=i(t[r],e[r],r);q.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Tt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Tt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const kt={};Tt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new H(r(o," has been removed"+(e?" in "+e:"")),H.ERR_DEPRECATED);return e&&!kt[o]&&(kt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};var At={assertOptions:function(t,e,n){if("object"!=typeof t)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new H("option "+i+" must be "+n,H.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new H("Unknown option "+i,H.ERR_BAD_OPTION)}},validators:Tt};const Nt=At.validators;class Ft{constructor(t){this.defaults=t,this.interceptors={request:new $,response:new $}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&At.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),null!=r&&(q.isFunction(r)?e.paramsSerializer={serialize:r}:At.assertOptions(r,{encode:Nt.function,serialize:Nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&q.merge(o.common,o[e.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=dt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[xt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new bt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Ut((function(e){t=e})),cancel:t}}}var qt=Ut;const Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((([t,e])=>{Ht[e]=t}));var Lt=Ht;const Dt=function t(e){const n=new Mt(e),o=r(Mt.prototype.request,n);return q.extend(o,Mt.prototype,n,{allOwnKeys:!0}),q.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(jt(e,n))},o}(st);Dt.Axios=Mt,Dt.CanceledError=bt,Dt.CancelToken=qt,Dt.isCancel=vt,Dt.VERSION="1.6.8",Dt.toFormData=W,Dt.AxiosError=H,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=function(t){return function(e){return t.apply(null,e)}},Dt.isAxiosError=function(t){return q.isObject(t)&&!0===t.isAxiosError},Dt.mergeConfig=jt,Dt.AxiosHeaders=dt,Dt.formToJSON=t=>it(q.isHTMLForm(t)?new FormData(t):t),Dt.getAdapter=Et,Dt.HttpStatusCode=Lt,Dt.default=Dt,t.exports=Dt}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e){for(var n=0;nC});var c=n(4756),l=n.n(c),f=function(){return u((function t(){var e,n,r,i,a,s,u,c,l,f,h,p,d,y,v,b,g,m,w,_,O,S=this,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.server=P.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(e=this.server.cacheSearchResultsForSeconds)&&void 0!==e?e:120,this.additionalSearchParameters=null!==(n=P.additionalSearchParameters)&&void 0!==n?n:{},this.additionalSearchParameters.query_by=null!==(r=null!==(i=this.additionalSearchParameters.queryBy)&&void 0!==i?i:this.additionalSearchParameters.query_by)&&void 0!==r?r:"",this.additionalSearchParameters.preset=null!==(a=null!==(s=this.additionalSearchParameters.preset)&&void 0!==s?s:this.additionalSearchParameters.preset)&&void 0!==a?a:"",this.additionalSearchParameters.sort_by=null!==(u=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==u?u:"",this.additionalSearchParameters.highlight_full_fields=null!==(l=null!==(f=this.additionalSearchParameters.highlightFullFields)&&void 0!==f?f:this.additionalSearchParameters.highlight_full_fields)&&void 0!==l?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=P.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=P.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=P.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=S.collectionSpecificSearchParameters[t];s.query_by=null!==(e=s.queryBy)&&void 0!==e?e:s.query_by,s.preset=null!==(n=s.preset)&&void 0!==n?n:s.preset,s.sort_by=null!==(r=s.sortBy)&&void 0!==r?r:s.sort_by,s.highlight_full_fields=null!==(o=null!==(i=null!==(a=s.highlightFullFields)&&void 0!==a?a:s.highlight_full_fields)&&void 0!==i?i:S.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:s.query_by,Object.keys(s).forEach((function(t){return void 0===s[t]?delete s[t]:{}}))})),this.renderingContent=P.renderingContent,this.flattenGroupedHits=null===(y=P.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=P.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(b=P.filterByOptions)&&void 0!==b?b:{},this.sortByOptions=null!==(g=P.sortByOptions)&&void 0!==g?g:{},this.collectionSpecificFacetByOptions=null!==(m=P.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(w=P.collectionSpecificFilterByOptions)&&void 0!==w?w:{},this.collectionSpecificSortByOptions=null!==(_=P.collectionSpecificSortByOptions)&&void 0!==_?_:{},this.useExcludeForUnboundNumericRange=null!==(O=P.useExcludeForUnboundNumericRange)&&void 0!==O&&O}),[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(t){return t.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(t){return 0===(t.query_by||"").length&&0===(t.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])}(),h=n(8567);function p(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(r).join(",")));var o=Object.keys(r)[0],i=r[o].reduce((function(t,e){return e.startsWith("-")&&!n._isNumber(e)?t[0].push(e.substring(1)):t[1].push(e),t}),[[],[]]),a=v(i,2),s=a[0],u=a[1],c=[];if(u.length>0){var l=n._shouldUseExactMatchForField(o,e)?":=":":";c.push("".concat(o).concat(l,"[").concat(u.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}if(s.length>0){var f=n._shouldUseExactMatchForField(o,e)?":!=":":!";c.push("".concat(o).concat(f,"[").concat(s.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}return c.filter((function(t){return t})).join(" && ")}var h,p=n._parseFacetFilter(t),d=p.fieldName,y=p.fieldValue;if(y.startsWith("-")&&!n._isNumber(y)){var b=n._shouldUseExactMatchForField(d,e)?":!=":":!";h="".concat(d).concat(b,"[").concat(n._escapeFacetValue(y.substring(1)),"]")}else{var g=n._shouldUseExactMatchForField(d,e)?":=":":";h="".concat(d).concat(g,"[").concat(n._escapeFacetValue(y),"]")}return h})).join(" && "):r}},{key:"_parseFacetFilter",value:function(t){var e,n,r,o,i;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(r=t.match(n)))return{fieldName:o="".concat(r[1]),fieldValue:i="".concat(r[2])}}return n=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(r[1]).concat(r[2]),i="".concat(r[3])),{fieldName:o,fieldValue:i}}},{key:"_escapeFacetValue",value:function(t){return"boolean"==typeof t||"true"===t||"false"===t||this._isNumber(t)?t:"`".concat(t,"`")}},{key:"_isNumber",value:function(t){return Number.isInteger(t%1)||!!(t%1)}},{key:"_adaptNumericFilters",value:function(t){var e=this,n="";if(!t)return n;var r={};t.forEach((function(t){var n=e._parseNumericFilter(t),o=n.fieldName,i=n.operator,a=n.fieldValue;r[o]=r[o]||{},r[o][i]=a}));var o=[];return Object.keys(r).forEach((function(t){null!=r[t]["<="]&&null!=r[t][">="]?e.configuration.useExcludeForUnboundNumericRange&&r[t][">="]>r[t]["<="]?o.push("".concat(t,":!=[").concat(r[t]["<="],"..").concat(r[t][">="],"]")):o.push("".concat(t,":=[").concat(r[t][">="],"..").concat(r[t]["<="],"]")):null!=r[t]["<="]?o.push("".concat(t,":<=").concat(r[t]["<="])):null!=r[t][">="]?o.push("".concat(t,":>=").concat(r[t][">="])):null!=r[t]["="]?o.push("".concat(t,":=").concat(r[t]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(r[t])))})),o.join(" && ")}},{key:"_parseNumericFilter",value:function(t){var e,n,r,o,i,a;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(r=t.match(n))){var u=v(r,4);return{fieldName:o=u[1],operator:i=u[2],fieldValue:a=u[3]}}}if(n=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var c=v(r,4);o=c[1],i=c[2],a=c[3]}return{fieldName:o,operator:i,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(t){var e=t.insideBoundingBox,n=t.aroundRadius,r=t.aroundLatLng,o=t.insidePolygon;if(e){var i,a,s,u;if(Array.isArray(e)){var c=v(e.flat(),4);i=c[0],a=c[1],s=c[2],u=c[3]}else{var l=v(e.split(","),4);i=l[0],a=l[1],s=l[2],u=l[3]}return"".concat(this.configuration.geoLocationField,":(").concat(i,", ").concat(a,", ").concat(i,", ").concat(u,", ").concat(s,", ").concat(u,", ").concat(s,", ").concat(a,")")}if(r||n){if(!n||"all"===n)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var f="".concat(parseFloat(n)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(r,", ").concat(f,")")}if(o){var h=o;return Array.isArray(o)&&(h=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(h,")")}}},{key:"_adaptFilters",value:function(t,e){var n=[];return t.filters&&n.push(t.filters),n.push(this._adaptFacetFilters(t.facetFilters,e)),n.push(this._adaptNumericFilters(t.numericFilters)),n.push(this._adaptGeoFilter(t)),n.filter((function(t){return t&&""!==t})).join(" && ")}},{key:"_adaptIndexName",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(t,e){var n=this;return[t].flat().map((function(t){var r;return null!==(r=n.configuration.collectionSpecificFacetByOptions)&&void 0!==r&&null!==(r=r[e])&&void 0!==r&&r[t]?"".concat(t).concat(n.configuration.collectionSpecificFacetByOptions[e][t]):n.configuration.facetByOptions[t]?"".concat(t).concat(n.configuration.facetByOptions[t]):t})).join(",")}},{key:"_buildSearchParameters",value:function(t){for(var e,n,r=t.params,o=t.indexName,i=this._adaptIndexName(o),a={},s=0,u=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]);var t}();function m(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _={_adaptHighlightTag:function(t,e,n){return t.replace(new RegExp("","g"),e||"").replace(new RegExp("","g"),n||"")},_adaptNumberOfPages:function(){var t=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(t)?Math.ceil(t):1}};function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n,this.configuration=r,this.allTypesenseResults=i,this.fullTypesenseResponse=a}),[{key:"_adaptGroupedHits",value:function(t){var e=this,n=[];return n=t.map((function(t){var n=e._adaptHits(t.hits);return n.forEach((function(e){e.group_key=e._group_key=t.group_key,t.found&&(e._group_found=t.found)})),n})),this.configuration.flattenGroupedHits?n.flat():n.map((function(t){return S(S({},t[0]),{},{_grouped_hits:t})}))}},{key:"_adaptHits",value:function(t){var e=this;return t.map((function(t){var n=S({},t.document);n.objectID=t.document.id,n._snippetResult=e._adaptHighlightResult(t,"snippet"),n._highlightResult=e._adaptHighlightResult(t,"value"),n._rawTypesenseHit=t,e.fullTypesenseResponse.conversation&&(n._rawTypesenseConversation=e.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(e){Object.keys(t).includes(e)&&!Object.keys(n).includes(e)&&(n[e]=t[e])}));var r=n[e.configuration.geoLocationField];return r&&(n._geoloc={lat:r[0],lng:r[1]}),n}))}},{key:"_adaptHighlightResult",value:function(t,e){var n={};return null!=t.highlight&&this.isHighlightPost0240RCN32Format(t.highlight)?this.adaptHighlightObject(t,n,e):this.adaptHighlightsArray(t,n,e),n}},{key:"isHighlightPost0240RCN32Format",value:function(t){return null==t.full&&null==t.snippet}},{key:"adaptHighlightsArray",value:function(t,e,n){var r=this;Object.assign.apply(Object,[e].concat(m(Object.entries(t.document).map((function(t){var e=v(t,2);return w({},e[0],{value:e[1],matchLevel:"none",matchedWords:[]})}))))),t.highlights.forEach((function(t){e[t.field]={value:t[n]||t["".concat(n,"s")],matchLevel:"full",matchedWords:t.matched_tokens},t.indices&&(e[t.field].matchedIndices=t.indices)})),Object.entries(e).forEach((function(o){var a=v(o,2),s=a[0],u=a[1],c=s,l=u.value,f=u.matchLevel,h=u.matchedWords,p=u.matchedIndices;null==l?e[c]=r._adaptHighlightNullValue():Array.isArray(l)?(e[c]=[],t.document[c].forEach((function(t,o){p&&p.includes(o)?e[c].push({value:r._adaptHighlightTag("".concat(l[p.indexOf(o)]),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag),matchLevel:f,matchedWords:h[o]}):"object"===i(t)?e[c].push(r._adaptHighlightInObjectValue(t,{},n)):e[c].push({value:"".concat(t),matchLevel:"none",matchedWords:[]})}))):"object"===i(l)?e[c]=r._adaptHighlightInObjectValue(l,{},n):e[c].value=r._adaptHighlightTag("".concat(l),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(t,e,n){Object.assign(e,this._adaptHighlightInObjectValue(t.document,t.highlight,n))}},{key:"_adaptHighlightInObjectValue",value:function(t,e,n){var r=this;return Object.assign.apply(Object,[{}].concat(m(Object.entries(t).map((function(t){var o,a=v(t,2),s=a[0],u=a[1];if(null==u)o=r._adaptHighlightNullValue();else if(Array.isArray(u)){var c;o=r._adaptHighlightInArrayValue(u,null!==(c=null==e?void 0:e[s])&&void 0!==c?c:[],n)}else if("object"===i(u)){var l;o=r._adaptHighlightInObjectValue(u,null!==(l=null==e?void 0:e[s])&&void 0!==l?l:{},n)}else o=r._adaptHighlightInPrimitiveValue(u,null==e?void 0:e[s],n);return w({},s,o)})))))}},{key:"_adaptHighlightInArrayValue",value:function(t,e,n){var r=this;return t.map((function(t,o){var a;if(null==t)a=r._adaptHighlightNullValue();else if(Array.isArray(t)){var s;a=r._adaptHighlightInArrayValue(t,null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],n)}else if("object"===i(t)){var u;a=r._adaptHighlightInObjectValue(t,null!==(u=null==e?void 0:e[o])&&void 0!==u?u:{},n)}else a=r._adaptHighlightInPrimitiveValue(t,null==e?void 0:e[o],n);return a}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(t,e,n){var r,o;return null!=e?{value:this._adaptHighlightTag("".concat(null!==(r=null!==(o=e[n])&&void 0!==o?o:e.highlight)&&void 0!==r?r:e.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(e.matched_tokens||[]).length>0?"full":"none",matchedWords:e.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(t),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(t){var e={};return t.forEach((function(t){Object.assign(e,w({},t.field_name,Object.assign.apply(Object,[{}].concat(m(t.counts.map((function(t){return w({},t.value,t.count)})))))))})),e}},{key:"_adaptFacetStats",value:function(t){var e={};return t.forEach((function(t){Object.keys(t.stats).length>0&&Object.assign(e,w({},t.field_name,t.stats))})),e}},{key:"_adaptRenderingContent",value:function(t){var e,n=Object.assign({},this.configuration.renderingContent);return null==(null===(e=n.facetOrdering)||void 0===e||null===(e=e.facets)||void 0===e?void 0:e.order)&&(n.facetOrdering=n.facetOrdering||{},n.facetOrdering.facets=n.facetOrdering.facets||{},n.facetOrdering.facets.order=m(new Set(t.map((function(t){return t.field_name})).concat(this.allTypesenseResults.map((function(t){return t.facet_counts||[]})).flat().map((function(t){return t.field_name})).filter((function(t){return t})))))),n}},{key:"adapt",value:function(){var t=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),e=S({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(t).length>0?{renderingContent:t}:null);return this.fullTypesenseResponse.conversation&&0===e.hits.length&&(e.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),e}}])}();Object.assign(P.prototype,_);var E=function(){return u((function t(e,n){o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n}),[{key:"_adaptFacetHits",value:function(t){var e=this;return t.find((function(t){return t.field_name===e.instantsearchRequest.params.facetName})).counts.map((function(t){return{value:t.value,highlighted:e._adaptHighlightTag(t.highlighted,e.instantsearchRequest.params.highlightPreTag,e.instantsearchRequest.params.highlightPostTag),count:t.count}}))}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])}();Object.assign(E.prototype,_);var C=function(){return u((function t(e){var n=this;o(this,t),this.updateConfiguration(e),this.searchClient={clearCache:function(){return n.clearCache()},search:function(t){return n.searchTypesenseAndAdapt(t)},searchForFacetValues:function(t){return n.searchTypesenseForFacetValuesAndAdapt(t)}}}),[{key:"searchTypesenseAndAdapt",value:(r=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,r){return o._validateTypesenseResult(t),new P(t,e[r],o.configuration,n.results,n).adapt()})),t.abrupt("return",{results:r});case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return r.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(n=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,n){return o._validateTypesenseResult(t),new E(t,e[n],o.configuration).adapt()})),t.abrupt("return",r);case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return n.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(t=e(l().mark((function t(e){var n,r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new g(e,this.typesenseClient,this.configuration),t.next=3,n.request();case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new h.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(t){return this.configuration=new f(t),this.configuration.validate(),this.typesenseClient=new h.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(t){if(t.error)throw new Error("".concat(t.code," - ").concat(t.error));if(!t.hits&&!t.grouped_hits)throw new Error("Did not find any hits. ".concat(t.code," - ").concat(t.error))}}]);var t,n,r}()})(),r.default})())); //# sourceMappingURL=typesense-instantsearch-adapter.min.js.map \ No newline at end of file diff --git a/dist/typesense-instantsearch-adapter.min.js.map b/dist/typesense-instantsearch-adapter.min.js.map index 19b3933..5f6419f 100644 --- a/dist/typesense-instantsearch-adapter.min.js.map +++ b/dist/typesense-instantsearch-adapter.min.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense-instantsearch-adapter.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuC,8BAAID,IAE3CD,EAAoC,8BAAIC,GACzC,CATD,CASGK,MAAM,gCCTTH,EAAOD,QAAU,EAAjB,mCCEA,IAAIK,EAAQ,EAAQ,MAChBC,EAAS,EAAQ,MACjBC,EAAU,EAAQ,MAClBC,EAAW,EAAQ,MACnBC,EAAgB,EAAQ,MACxBC,EAAe,EAAQ,MACvBC,EAAkB,EAAQ,MAC1BC,EAAc,EAAQ,MACtBC,EAAuB,EAAQ,MAC/BC,EAAS,EAAQ,MAErBb,EAAOD,QAAU,SAAoBe,GACnC,OAAO,IAAIC,SAAQ,SAA4BC,EAASC,GACtD,IAGIC,EAHAC,EAA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6EA,CAtF+C","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/adapters/xhr.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/axios.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/cancel/Cancel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/cancel/CancelToken.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/cancel/isCancel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/Axios.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/InterceptorManager.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/buildFullPath.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/createError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/dispatchRequest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/enhanceError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/mergeConfig.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/settle.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/core/transformData.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/defaults/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/defaults/transitional.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/env/data.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/bind.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/buildURL.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/combineURLs.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/cookies.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/spread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/helpers/validator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/lib/utils.js","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar transitionalDefaults = require('../defaults/transitional');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar enhanceError = require('../core/enhanceError');\nvar transitionalDefaults = require('./transitional');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","module.exports = {\n \"version\": \"0.26.1\"\n};","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return toString.call(val) === '[object FormData]';\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return toString.call(val) === '[object URLSearchParams]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (idOrQuery) {\n if (idOrQuery === void 0) { idOrQuery = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (typeof idOrQuery === \"string\") {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(idOrQuery), idOrQuery)];\n }\n else {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), idOrQuery)];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","utils","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","transitionalDefaults","Cancel","config","Promise","resolve","reject","onCanceled","requestData","data","requestHeaders","headers","responseType","done","cancelToken","unsubscribe","signal","removeEventListener","isFormData","request","XMLHttpRequest","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","fullPath","baseURL","url","onloadend","responseHeaders","getAllResponseHeaders","response","responseText","status","statusText","value","err","open","method","toUpperCase","params","paramsSerializer","timeout","onreadystatechange","readyState","responseURL","indexOf","setTimeout","onabort","onerror","ontimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","isStandardBrowserEnv","xsrfValue","withCredentials","xsrfCookieName","read","undefined","xsrfHeaderName","forEach","val","key","toLowerCase","setRequestHeader","isUndefined","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","type","abort","subscribe","aborted","send","bind","Axios","mergeConfig","axios","createInstance","defaultConfig","context","instance","prototype","extend","create","instanceConfig","CancelToken","isCancel","VERSION","all","promises","spread","isAxiosError","message","this","toString","__CANCEL__","executor","TypeError","resolvePromise","promise","token","then","_listeners","i","l","length","onfulfilled","_resolve","reason","throwIfRequested","listener","push","index","splice","source","c","InterceptorManager","dispatchRequest","validator","validators","defaults","interceptors","configOrUrl","assertOptions","silentJSONParsing","boolean","forcedJSONParsing","requestInterceptorChain","synchronousRequestInterceptors","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","responseInterceptorChain","chain","Array","apply","concat","shift","newConfig","onFulfilled","onRejected","error","getUri","replace","handlers","use","options","eject","id","fn","h","isAbsoluteURL","combineURLs","requestedURL","enhanceError","code","Error","transformData","throwIfCancellationRequested","call","transformRequest","merge","common","adapter","transformResponse","toJSON","name","description","number","fileName","lineNumber","columnNumber","stack","config1","config2","getMergedValue","target","isPlainObject","isArray","slice","mergeDeepProperties","prop","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","Object","keys","configValue","validateStatus","fns","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","process","isArrayBuffer","isBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","isURLSearchParams","isObject","rawValue","parser","encoder","isString","JSON","parse","trim","e","stringify","stringifySafely","strictJSONParsing","maxContentLength","maxBodyLength","thisArg","args","arguments","encode","serializedParams","parts","v","isDate","toISOString","join","hashmarkIndex","relativeURL","write","expires","path","domain","secure","cookie","isNumber","Date","toGMTString","document","match","RegExp","decodeURIComponent","remove","now","test","payload","originURL","msie","navigator","userAgent","urlParsingNode","createElement","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","window","location","requestURL","parsed","normalizedName","ignoreDuplicateOf","split","line","substr","callback","arr","thing","deprecatedWarnings","version","formatMessage","opt","desc","opts","console","warn","schema","allowUnknown","result","getPrototypeOf","isFunction","obj","hasOwnProperty","constructor","ArrayBuffer","isView","pipe","product","assignValue","a","b","str","stripBOM","content","charCodeAt","definition","noop","undefinedType","isIE","logMethods","bindMethod","methodName","Function","traceForIE","log","trace","replaceLoggingMethods","level","loggerName","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","realMethod","Logger","defaultLevel","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","exec","levels","getLevel","setLevel","persist","SILENT","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","logger","_log","noConflict","getLoggers","__createBinding","o","m","k","k2","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","__importStar","mod","__importDefault","Errors","SearchClient","Client","Client_1","default","SearchClient_1","__awaiter","_arguments","P","generator","step","next","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","op","pop","Aliases_1","Alias","apiCall","retrieve","_a","endpointPath","delete","RESOURCEPATH","Aliases","upsert","mapping","put","aliasName","AnalyticsRules_1","AnalyticsRule_1","Analytics","individualAnalyticsRules","_analyticsRules","rules","AnalyticsRule","AnalyticsRules","operation","axios_1","Errors_1","TypesenseError_1","HEALTHY","ApiCall","configuration","apiKey","nodes","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_b","_c","abortSignal","_d","_e","performRequest","post","bodyParameters","patch","requestType","_f","_g","_h","_j","_k","skipConnectionTimeout","requestNumber","lastException","_loop_1","this_1","numTries","state_1","_l","validate","node","abortListener","requestOptions","source_1","error_1","_m","getNextNode","uriFor","assign","defaultHeaders","Infinity","transformedData","startsWith","setNodeHealthcheck","customErrorForResponse","timer","isHealthy","nodeDueForHealthcheck","map","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_this","seconds","messageFromServer","errorMessage","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","httpStatus","Configuration_1","ApiCall_1","Collections_1","Collection_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","analytics","collections","collectionName","aliases","presets","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","update","exists","e_1","documents","documentId","Document","overrides","overrideId","synonyms","synonymId","Collections","__assign","s","p","Configuration","setDefaultPathInNode","setDefaultPortInNode","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","MissingConfigurationError","isNodeMissingAnyParameters","some","every","masterNode","readReplicaNodes","array","j","Math","floor","random","Debug","partialDocument","extendStatics","__extends","d","setPrototypeOf","__proto__","String","__","Documents","_super","action","idOrQuery","createMany","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","RangeError","includes","r","filter","success","ImportError","export","exportStream","SearchOnlyDocuments","importResults","TypesenseError","_newTarget","HTTPError_1","MissingConfigurationError_1","ObjectAlreadyExists_1","ObjectNotFound_1","ObjectUnprocessable_1","RequestMalformed_1","RequestUnauthorized_1","ServerError_1","ImportError_1","Health","Key","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","createHmac","keyPrefix","rawScopedKey","Metrics","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","clearCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","cacheResponseForSeconds","Operations","operationName","Override","Overrides","Preset","presetId","Presets","__spreadArray","to","pack","ar","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","requestTimestamp","set","size","SearchOnlyCollection_1","entries","SearchOnlyCollection","SearchOnlyDocuments_1","searchParameters","Synonym","Synonyms","_typeof","_regeneratorRuntime","asyncIterator","u","toStringTag","wrap","Generator","Context","makeInvokeMethod","tryCatch","arg","GeneratorFunction","GeneratorFunctionPrototype","values","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","async","reverse","prev","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","_classCallCheck","Constructor","toPropertyKey","toPrimitive","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","server","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","_objectWithoutProperties","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_arrayLikeToArray","len","arr2","_unsupportedIterableToArray","minLen","_slicedToArray","_excluded","SearchRequestAdapter","instantsearchRequests","typesenseClient","fieldName","_this$configuration$c","_this$configuration$f","exactMatch","facetFilters","adaptedResult","item","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","_fieldValues$reduce","reduce","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","_shouldUseExactMatchForField","_escapeFacetValue","typesenseFilterString","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches4","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl2","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","instantsearchParams","filters","_adaptFacetFilters","_adaptNumericFilters","_adaptGeoFilter","indexName","INDEX_NAME_MATCHING_REGEX","facets","_this3","facet","_this3$configuration$","instantsearchRequest","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","_adaptIndexName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","_adaptSortBy","q","query","facet_by","_adaptFacetBy","filter_by","_adaptFilters","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_request","_callee","_searches$","_searches$2","searches","_searches$3","conversation","conversation_id","conversation_model_id","_this4","_context","_buildSearchParameters","searchParams","_toConsumableArray","iter","_defineProperty","_adaptHighlightTag","highlightPreTag","highlightPostTag","_adaptNumberOfPages","typesenseResponse","found","request_params","isFinite","ceil","ownKeys","_objectSpread","getOwnPropertyDescriptors","defineProperties","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","objectID","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","matchLevel","matchedWords","highlights","matched_tokens","indices","attribute","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","adaptedValue","_ref7","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","typesenseFacetCounts","field_name","counts","count","stats","_adaptedResult$facetO","facetOrdering","order","Set","fc","facet_counts","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","FacetSearchResponseAdapter","find","facetCount","highlighted","facetHits","_adaptFacetHits","exhaustiveFacetsCount","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","results","typesenseResult","_validateTypesenseResult","adapt","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_context3","_x3","TypesenseSearchClient"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense-instantsearch-adapter.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuC,8BAAID,IAE3CD,EAAoC,8BAAIC,GACzC,CATD,CASGK,MAAM,sCCTT,SAMC,SAAUN,EAAMO,GACb,aAEI,EAMA,WAIJ,IAAIC,EAA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AAApH,EAAA,OAAAhxB,IAAAA,MAAA,SAAAq4B,GAAA,cAAAA,EAAAt1B,KAAAs1B,EAAArwC,MAAA,OACsD,OAA1GowC,EAAiB,IAAIhP,EAAqBC,EAAuB5mC,KAAK6mC,gBAAiB7mC,KAAK2I,eAAcitC,EAAArwC,KAAA,EAChFowC,EAAevtB,UAAS,OAAjC,OAAjBmmB,EAAiBqH,EAAAzvC,KAAAyvC,EAAAz2B,OAAA,SAChBovB,GAAiB,wBAAAqH,EAAAp1B,OAAA,GAAAk1B,EAAA,UACzB,SAAAG,GAAA,OAAAJ,EAAAp2C,MAAA,KAAAC,UAAA,KAAA8V,IAAA,aAAAnR,MAED,WAEE,OADAjE,KAAK6mC,gBAAkB,IAAIiP,EAAAA,aAAsB91C,KAAK2I,cAAcw7B,QAC7DnkC,KAAKw0C,YACd,GAAC,CAAAp/B,IAAA,sBAAAnR,MAED,SAAoBgN,GAIlB,OAHAjR,KAAK2I,cAAgB,IAAI0L,EAAcpD,GACvCjR,KAAK2I,cAAc2C,WACnBtL,KAAK6mC,gBAAkB,IAAIiP,EAAAA,aAAsB91C,KAAK2I,cAAcw7B,SAC7D,CACT,GAAC,CAAA/uB,IAAA,2BAAAnR,MAED,SAAyB+wC,GACvB,GAAIA,EAAgB3lC,MAClB,MAAM,IAAIjD,MAAM,GAADhF,OAAI4tC,EAAgBhnC,KAAI,OAAA5G,OAAM4tC,EAAgB3lC,QAE/D,IAAK2lC,EAAgB5F,OAAS4F,EAAgB1B,aAC5C,MAAM,IAAIlnC,MAAM,0BAADhF,OAA2B4tC,EAAgBhnC,KAAI,OAAA5G,OAAM4tC,EAAgB3lC,OAExF,KA3BC,IAAAomC,EAtBAJ,EA5BAT,CA6EA,CAtF+C","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false;\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][\">=\"] > filtersHash[field][\"<=\"]) {\n //exclude unbound range:\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","definition","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","log","trace","replaceLoggingMethods","level","loggerName","i","length","this","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","undefined","realMethod","Logger","name","defaultLevel","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","cookie","document","location","indexOf","encodeURIComponent","exec","slice","levels","getLevel","setLevel","persist","toUpperCase","SILENT","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","TypeError","logger","_log","noConflict","getLoggers","__createBinding","Object","create","o","m","k","k2","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","hasOwnProperty","__importDefault","Errors","SearchClient","Client","Client_1","default","SearchClient_1","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","done","then","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","op","pop","push","Aliases_1","Alias","apiCall","retrieve","_a","endpointPath","delete","concat","RESOURCEPATH","Aliases","upsert","mapping","put","aliasName","AnalyticsRules_1","AnalyticsRule_1","Analytics","individualAnalyticsRules","_analyticsRules","rules","id","AnalyticsRule","AnalyticsRules","params","operation","axios_1","Errors_1","TypesenseError_1","HEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_b","_c","abortSignal","_d","responseType","_e","performRequest","post","bodyParameters","patch","requestType","_f","_g","_h","_j","_k","skipConnectionTimeout","requestNumber","lastException","_loop_1","this_1","numTries","state_1","_l","validate","Date","now","node","abortListener","requestOptions","cancelToken","source_1","response","error_1","_m","getNextNode","index","aborted","Error","url","uriFor","headers","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","httpsAgent","CancelToken","source","cancel","addEventListener","token","setNodeHealthcheck","customErrorForResponse","message","warn","code","timer","removeEventListener","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_this","forEach","protocol","host","port","path","seconds","setTimeout","messageFromServer","errorMessage","trim","error","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","httpStatus","Configuration_1","ApiCall_1","Collections_1","Collection_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","Stopwords_1","Stopword_1","Conversations_1","Conversation_1","options","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","collections","collectionName","aliases","presets","stopwords","conversations","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","update","schema","exists","e_1","documents","documentId","Document","overrides","overrideId","synonyms","synonymId","Collections","__assign","s","p","Configuration","setDefaultPathInNode","setDefaultPortInNode","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","MissingConfigurationError","isNodeMissingAnyParameters","some","every","key","masterNode","readReplicaNodes","array","j","Math","floor","random","Conversation","ConversationModels_1","ConversationModel","ConversationModels","ConversationModel_1","Conversations","individualConversationModels","_conversationsModels","models","Debug","partialDocument","extendStatics","__extends","d","b","setPrototypeOf","__proto__","Array","String","__","constructor","Documents","_super","action","query","createMany","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","isArray","RangeError","includes","split","r","filter","success","ImportError","export","exportStream","SearchOnlyDocuments","importResults","TypesenseError","_newTarget","HTTPError_1","MissingConfigurationError_1","ObjectAlreadyExists_1","ObjectNotFound_1","ObjectUnprocessable_1","RequestMalformed_1","RequestUnauthorized_1","ServerError_1","ImportError_1","Health","Key","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","createHmac","keyPrefix","substr","rawScopedKey","toString","Metrics","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","clearCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","cacheResponseForSeconds","Operations","operationName","Override","Overrides","Preset","presetId","Presets","__spreadArray","to","pack","ar","l","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","requestTimestamp","set","size","SearchOnlyCollection_1","entries","SearchOnlyCollection","SearchOnlyDocuments_1","search","searchParameters","Stopword","stopwordId","Stopwords","Synonym","Synonyms","_typeof","_regeneratorRuntime","a","c","asyncIterator","u","toStringTag","wrap","Generator","Context","makeInvokeMethod","tryCatch","type","arg","h","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","values","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","async","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","fn","kindOf","cache","thing","str","toLowerCase","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","utils$1","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","position","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","p1","p2","toFiniteNumber","defaultValue","Number","isFinite","global","generateString","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","target","reducedValue","isThenable","catch","AxiosError","config","request","captureStackTrace","toJSON","description","number","fileName","lineNumber","columnNumber","prototype$1","isVisitable","removeBrackets","renderKey","dots","customProps","axiosError","cause","predicates","toFormData","formData","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","isFlatArray","el","exposedHelpers","build","encode$1","charMap","match","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","synchronous","runWhen","eject","clear","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","freeze","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","defaults","transitional","adapter","transformRequest","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","stringifySafely","JSONRequested","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","common","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","tokens","tokensRE","parseTokens","has","matcher","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","first","computed","accessor","accessors","defineAccessor","accessorName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","write","expires","domain","secure","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","hash","hostname","pathname","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","unsubscribe","signal","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","abort","subscribe","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","validators$1","deprecatedWarnings","validator","version","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$1","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","args","_classCallCheck","Constructor","toPropertyKey","toPrimitive","_defineProperties","_createClass","protoProps","staticProps","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","_options$useExcludeFo","server","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","useExcludeForUnboundNumericRange","_objectWithoutProperties","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_slicedToArray","_excluded","SearchRequestAdapter","instantsearchRequests","typesenseClient","fieldName","_this$configuration$c","_this$configuration$f","exactMatch","facetFilters","adaptedResult","item","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","_fieldValues$reduce","reduce","_isNumber","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","_shouldUseExactMatchForField","_escapeFacetValue","typesenseFilterString","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","isInteger","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches4","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl2","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","instantsearchParams","filters","_adaptFacetFilters","_adaptNumericFilters","_adaptGeoFilter","indexName","INDEX_NAME_MATCHING_REGEX","facets","_this3","facet","_this3$configuration$","instantsearchRequest","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","_adaptIndexName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","_adaptSortBy","q","facet_by","_adaptFacetBy","filter_by","_adaptFilters","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_callee","_searches$","_searches$2","searches","_searches$3","conversation","conversation_id","conversation_model_id","_this4","_context","_buildSearchParameters","searchParams","_toConsumableArray","iter","_defineProperty","utils","_adaptHighlightTag","highlightPreTag","highlightPostTag","_adaptNumberOfPages","typesenseResponse","found","request_params","ceil","ownKeys","_objectSpread","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","objectID","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","matchLevel","matchedWords","highlights","matched_tokens","indices","attribute","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","adaptedValue","_ref7","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","typesenseFacetCounts","field_name","counts","count","stats","_adaptedResult$facetO","facetOrdering","order","Set","fc","facet_counts","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","FacetSearchResponseAdapter","find","facetCount","highlighted","facetHits","_adaptFacetHits","exhaustiveFacetsCount","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","results","typesenseResult","_validateTypesenseResult","adapt","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_context3","_x3","TypesenseSearchClient"],"sourceRoot":""} \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 8f381d7..2293f42 100644 --- a/index.d.ts +++ b/index.d.ts @@ -95,6 +95,7 @@ interface BaseAdapterOptions { collectionSpecificFilterByOptions?: object; sortByOptions?: object; collectionSpecificSortByOptions?: object; + useExcludeForUnboundNumericRange?: boolean; } interface CollectionSearchParameters { diff --git a/lib/Configuration.js b/lib/Configuration.js index 56575db..d9f6008 100644 --- a/lib/Configuration.js +++ b/lib/Configuration.js @@ -29,7 +29,8 @@ var Configuration = exports.Configuration = /*#__PURE__*/function () { _options$sortByOption, _options$collectionSp2, _options$collectionSp3, - _options$collectionSp4; + _options$collectionSp4, + _options$useExcludeFo; var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; (0, _classCallCheck2["default"])(this, Configuration); this.server = options.server || { @@ -70,6 +71,7 @@ var Configuration = exports.Configuration = /*#__PURE__*/function () { this.collectionSpecificFacetByOptions = (_options$collectionSp2 = options.collectionSpecificFacetByOptions) !== null && _options$collectionSp2 !== void 0 ? _options$collectionSp2 : {}; this.collectionSpecificFilterByOptions = (_options$collectionSp3 = options.collectionSpecificFilterByOptions) !== null && _options$collectionSp3 !== void 0 ? _options$collectionSp3 : {}; this.collectionSpecificSortByOptions = (_options$collectionSp4 = options.collectionSpecificSortByOptions) !== null && _options$collectionSp4 !== void 0 ? _options$collectionSp4 : {}; + this.useExcludeForUnboundNumericRange = (_options$useExcludeFo = options.useExcludeForUnboundNumericRange) !== null && _options$useExcludeFo !== void 0 ? _options$useExcludeFo : false; } return (0, _createClass2["default"])(Configuration, [{ key: "validate", diff --git a/lib/Configuration.js.map b/lib/Configuration.js.map index d5a79e1..03ab599 100644 --- a/lib/Configuration.js.map +++ b/lib/Configuration.js.map @@ -1 +1 @@ -{"version":3,"file":"Configuration.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","Configuration","_classCallCheck2","_createClass2","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","validate","values","some","c","console","warn","Error"],"sources":["../src/Configuration.js"],"sourcesContent":["\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,aAAA;AAAA,IAAAC,gBAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAEAK,aAAa,GAAAF,OAAA,CAAAE,aAAA;EACxB,SAAAA,cAAA,EAA0B;IAAA,IAAAG,qBAAA;MAAAC,qBAAA;MAAAC,IAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,sBAAA;MAAAC,sBAAA;MAAAC,sBAAA;IAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAAA,IAAAxB,gBAAA,mBAAAD,aAAA;IACtB,IAAI,CAAC4B,MAAM,GAAGJ,OAAO,CAACI,MAAM,IAAI;MAC9BC,KAAK,EAAE,CACL;QACEC,IAAI,EAAE,WAAW;QACjBC,IAAI,EAAE,MAAM;QACZC,IAAI,EAAE,EAAE;QACRC,QAAQ,EAAE;MACZ,CAAC;IAEL,CAAC;IAED,IAAI,CAACL,MAAM,CAACM,4BAA4B,IAAA/B,qBAAA,GAAG,IAAI,CAACyB,MAAM,CAACM,4BAA4B,cAAA/B,qBAAA,cAAAA,qBAAA,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OAAO;MAAA,EAAC,EAC7E;QACAgC,OAAO,CAACC,IAAI,CACV,6PAA6P,GAC3P,4NACJ,CAAC;MACH;;MAEA;AACJ;AACA;AACA;AACA;MACI,IACE,IAAI,CAACnC,0BAA0B,CAACC,QAAQ,CAACV,MAAM,KAAK,CAAC,IACrD,IAAI,CAACS,0BAA0B,CAACG,MAAM,CAACZ,MAAM,KAAK,CAAC,KAClD9B,MAAM,CAACkD,IAAI,CAAC,IAAI,CAACD,kCAAkC,CAAC,CAACnB,MAAM,KAAK,CAAC,IAChE9B,MAAM,CAACsE,MAAM,CAAC,IAAI,CAACrB,kCAAkC,CAAC,CAACsB,IAAI,CACzD,UAACC,CAAC;QAAA,OAAK,CAACA,CAAC,CAAChC,QAAQ,IAAI,EAAE,EAAEV,MAAM,KAAK,CAAC,IAAI,CAAC0C,CAAC,CAAC9B,MAAM,IAAI,EAAE,EAAEZ,MAAM,KAAK,CAAC;MAAA,CACzE,CAAC,CAAC,EACJ;QACA,MAAM,IAAI6C,KAAK,CACb,+OACF,CAAC;MACH;IACF;EAAC;AAAA","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Configuration.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","Configuration","_classCallCheck2","_createClass2","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","_options$useExcludeFo","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","useExcludeForUnboundNumericRange","validate","values","some","c","console","warn","Error"],"sources":["../src/Configuration.js"],"sourcesContent":["\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false;\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,aAAA;AAAA,IAAAC,gBAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,aAA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MAAM,KAAK,CAAC,KAClD/B,MAAM,CAACmD,IAAI,CAAC,IAAI,CAACD,kCAAkC,CAAC,CAACnB,MAAM,KAAK,CAAC,IAChE/B,MAAM,CAACwE,MAAM,CAAC,IAAI,CAACtB,kCAAkC,CAAC,CAACuB,IAAI,CACzD,UAACC,CAAC;QAAA,OAAK,CAACA,CAAC,CAACjC,QAAQ,IAAI,EAAE,EAAEV,MAAM,KAAK,CAAC,IAAI,CAAC2C,CAAC,CAAC/B,MAAM,IAAI,EAAE,EAAEZ,MAAM,KAAK,CAAC;MAAA,CACzE,CAAC,CAAC,EACJ;QACA,MAAM,IAAI8C,KAAK,CACb,+OACF,CAAC;MACH;IACF;EAAC;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/lib/SearchRequestAdapter.js b/lib/SearchRequestAdapter.js index 438ef53..d40d67d 100644 --- a/lib/SearchRequestAdapter.js +++ b/lib/SearchRequestAdapter.js @@ -243,11 +243,16 @@ var SearchRequestAdapter = exports.SearchRequestAdapter = /*#__PURE__*/function }); // Transform that to: - // "field1:=[634..289] && field2:<=5 && field3:>=3" + // "field1:=[634..289] && field2:<=5 && field3:>=3" var adaptedFilters = []; Object.keys(filtersHash).forEach(function (field) { if (filtersHash[field]["<="] != null && filtersHash[field][">="] != null) { - adaptedFilters.push("".concat(field, ":=[").concat(filtersHash[field][">="], "..").concat(filtersHash[field]["<="], "]")); + if (_this2.configuration.useExcludeForUnboundNumericRange && filtersHash[field][">="] > filtersHash[field]["<="]) { + //exclude unbound range: + adaptedFilters.push("".concat(field, ":!=[").concat(filtersHash[field]["<="], "..").concat(filtersHash[field][">="], "]")); + } else { + adaptedFilters.push("".concat(field, ":=[").concat(filtersHash[field][">="], "..").concat(filtersHash[field]["<="], "]")); + } } else if (filtersHash[field]["<="] != null) { adaptedFilters.push("".concat(field, ":<=").concat(filtersHash[field]["<="])); } else if (filtersHash[field][">="] != null) { diff --git a/lib/SearchRequestAdapter.js.map b/lib/SearchRequestAdapter.js.map index 928e447..9f29297 100644 --- a/lib/SearchRequestAdapter.js.map +++ b/lib/SearchRequestAdapter.js.map @@ -1 +1 @@ -{"version":3,"file":"SearchRequestAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","SearchRequestAdapter","_regenerator","_objectWithoutProperties2","_asyncToGenerator2","_slicedToArray2","_classCallCheck2","_createClass2","_excluded","instantsearchRequests","typesenseClient","configuration","additionalSearchParameters","collectionSpecificSearchParameters","key","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","collectionSpecificFilterByOptions","exactMatch","filterByOptions","_adaptFacetFilters","facetFilters","_this","adaptedResult","transformedTypesenseFilters","map","item","Array","isArray","intermediateFacetFilters","forEach","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","keys","length","console","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","facetableFieldsWithSpecialCharacters","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","warn","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","_ref","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","geoLocationField","Error","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","facet","_this3$configuration$","collectionSpecificFacetByOptions","facetByOptions","_buildSearchParameters","instantsearchRequest","_this$configuration$c2","_this$configuration$s","params","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","assign","adaptedSortBy","collection","q","query","undefined","facet_by","filter_by","sort_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","collectionSpecificSortByOptions","sortByOptions","fromEntries","_ref2","_ref3","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","arguments","get"],"sources":["../src/SearchRequestAdapter.js"],"sourcesContent":["\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,oBAAA;AAAA,IAAAC,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,yBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAAAQ,kBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAA,IAAAS,eAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAA,IAAAU,gBAAA,GAAAX,sBAAA,CAAAC,OAAA;AAAA,IAAAW,aAAA,GAAAZ,sBAAA,CAAAC,OAAA;AAAA,IAAAY,SAAA;AAAA,IAEAP,oBAAoB,GAAAF,OAAA,CAAAE,oBAAA;EAa/B,SAAAA,qBAAYQ,qBAAqB,EAAEC,eAAe,EAAEC,aAAa,EAAE;IAAA,IAAAL,gBAAA,mBAAAL,oBAAA;IACjE,IAAI,CAACQ,qBAAqB,GAAGA,qBAA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IAC7C;EAAC;AAAA","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"SearchRequestAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","SearchRequestAdapter","_regenerator","_objectWithoutProperties2","_asyncToGenerator2","_slicedToArray2","_classCallCheck2","_createClass2","_excluded","instantsearchRequests","typesenseClient","configuration","additionalSearchParameters","collectionSpecificSearchParameters","key","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","collectionSpecificFilterByOptions","exactMatch","filterByOptions","_adaptFacetFilters","facetFilters","_this","adaptedResult","transformedTypesenseFilters","map","item","Array","isArray","intermediateFacetFilters","forEach","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","keys","length","console","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","facetableFieldsWithSpecialCharacters","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","useExcludeForUnboundNumericRange","warn","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","_ref","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","geoLocationField","Error","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","facet","_this3$configuration$","collectionSpecificFacetByOptions","facetByOptions","_buildSearchParameters","instantsearchRequest","_this$configuration$c2","_this$configuration$s","params","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","assign","adaptedSortBy","collection","q","query","undefined","facet_by","filter_by","sort_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","collectionSpecificSortByOptions","sortByOptions","fromEntries","_ref2","_ref3","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","arguments","get"],"sources":["../src/SearchRequestAdapter.js"],"sourcesContent":["\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][\">=\"] > filtersHash[field][\"<=\"]) {\n //exclude unbound range:\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,oBAAA;AAAA,IAAAC,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,yBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAAAQ,kBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAA,IAAAS,eAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAA,IAAAU,gBAAA,GAAAX,sBAAA,CAAAC,OAAA;AAAA,IAAAW,aAAA,GAAAZ,sBAAA,CAAAC,OAAA;AAAA,IAAAY,SAAA;AAAA,IAEAP,oBAAoB,GAAAF,OAAA,CAAAE,oBAA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AAY,CAAC;YAAA;YAAA;cAAA,OAAAO,QAAA,CAAAQ,IAAA;UAAA;QAAA,GAAApB,OAAA;MAAA,CACtF;MAAA,SAAAqB,QAAA;QAAA,OAAAvB,QAAA,CAAAwB,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAF,OAAA;IAAA;EAAA;IAAAvL,GAAA;IAAA0L,GAAA,EAneD,SAAAA,IAAA,EAAuC;MACrC,OAAO,IAAIlI,MAAM,CAAC,0BAA0B,CAAC;IAC/C;EAAC;IAAAxD,GAAA;IAAA0L,GAAA,EAED,SAAAA,IAAA,EAAwD;MACtD,OAAO,IAAIlI,MAAM,CAAC,wBAAwB,CAAC;IAC7C;EAAC;IAAAxD,GAAA;IAAA0L,GAAA,EAED,SAAAA,IAAA,EAA0D;MACxD,OAAO,IAAIlI,MAAM,CAAC,wBAAwB,CAAC;IAC7C;EAAC;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/src/Configuration.js b/src/Configuration.js index a8023e3..fb70454 100644 --- a/src/Configuration.js +++ b/src/Configuration.js @@ -59,6 +59,7 @@ export class Configuration { this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {}; this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {}; this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {}; + this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false; } validate() { diff --git a/src/SearchRequestAdapter.js b/src/SearchRequestAdapter.js index 4fadce7..7f88e2b 100644 --- a/src/SearchRequestAdapter.js +++ b/src/SearchRequestAdapter.js @@ -244,11 +244,16 @@ export class SearchRequestAdapter { }); // Transform that to: - // "field1:=[634..289] && field2:<=5 && field3:>=3" + // "field1:=[634..289] && field2:<=5 && field3:>=3" const adaptedFilters = []; Object.keys(filtersHash).forEach((field) => { if (filtersHash[field]["<="] != null && filtersHash[field][">="] != null) { - adaptedFilters.push(`${field}:=[${filtersHash[field][">="]}..${filtersHash[field]["<="]}]`); + if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][">="] > filtersHash[field]["<="]) { + //exclude unbound range: + adaptedFilters.push(`${field}:!=[${filtersHash[field]["<="]}..${filtersHash[field][">="]}]`); + } else { + adaptedFilters.push(`${field}:=[${filtersHash[field][">="]}..${filtersHash[field]["<="]}]`); + } } else if (filtersHash[field]["<="] != null) { adaptedFilters.push(`${field}:<=${filtersHash[field]["<="]}`); } else if (filtersHash[field][">="] != null) { From 8c736a5bd91077f047766772cd36862f6c98378a Mon Sep 17 00:00:00 2001 From: Anthony Bachour Date: Tue, 7 May 2024 17:33:53 -0400 Subject: [PATCH 2/3] compare numbers instead of strings --- src/SearchRequestAdapter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SearchRequestAdapter.js b/src/SearchRequestAdapter.js index 7f88e2b..35eadef 100644 --- a/src/SearchRequestAdapter.js +++ b/src/SearchRequestAdapter.js @@ -244,12 +244,12 @@ export class SearchRequestAdapter { }); // Transform that to: - // "field1:=[634..289] && field2:<=5 && field3:>=3" + // "field1:=[634..289] && field2:<=5 && field3:>=3" + // option to exclude unbound ranges const adaptedFilters = []; Object.keys(filtersHash).forEach((field) => { if (filtersHash[field]["<="] != null && filtersHash[field][">="] != null) { - if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][">="] > filtersHash[field]["<="]) { - //exclude unbound range: + if (this.configuration.useExcludeForUnboundNumericRange && parseInt(filtersHash[field][">="]) > parseInt(filtersHash[field]["<="])) { adaptedFilters.push(`${field}:!=[${filtersHash[field]["<="]}..${filtersHash[field][">="]}]`); } else { adaptedFilters.push(`${field}:=[${filtersHash[field][">="]}..${filtersHash[field]["<="]}]`); From 9cac080d37dc64fec90cd29e6d828f984f46ef2d Mon Sep 17 00:00:00 2001 From: Anthony Bachour Date: Tue, 7 May 2024 18:38:51 -0400 Subject: [PATCH 3/3] add builds --- dist/typesense-instantsearch-adapter.js | 6 +++--- dist/typesense-instantsearch-adapter.js.map | 2 +- dist/typesense-instantsearch-adapter.min.js | 2 +- dist/typesense-instantsearch-adapter.min.js.map | 2 +- lib/SearchRequestAdapter.js | 6 +++--- lib/SearchRequestAdapter.js.map | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/typesense-instantsearch-adapter.js b/dist/typesense-instantsearch-adapter.js index 4ac659f..c8a0b60 100644 --- a/dist/typesense-instantsearch-adapter.js +++ b/dist/typesense-instantsearch-adapter.js @@ -436,12 +436,12 @@ var SearchRequestAdapter = /*#__PURE__*/function () { }); // Transform that to: - // "field1:=[634..289] && field2:<=5 && field3:>=3" + // "field1:=[634..289] && field2:<=5 && field3:>=3" + // option to exclude unbound ranges var adaptedFilters = []; Object.keys(filtersHash).forEach(function (field) { if (filtersHash[field]["<="] != null && filtersHash[field][">="] != null) { - if (_this2.configuration.useExcludeForUnboundNumericRange && filtersHash[field][">="] > filtersHash[field]["<="]) { - //exclude unbound range: + if (_this2.configuration.useExcludeForUnboundNumericRange && parseInt(filtersHash[field][">="]) > parseInt(filtersHash[field]["<="])) { adaptedFilters.push("".concat(field, ":!=[").concat(filtersHash[field]["<="], "..").concat(filtersHash[field][">="], "]")); } else { adaptedFilters.push("".concat(field, ":=[").concat(filtersHash[field][">="], "..").concat(filtersHash[field]["<="], "]")); diff --git a/dist/typesense-instantsearch-adapter.js.map b/dist/typesense-instantsearch-adapter.js.map index 86ffeee..4317222 100644 --- a/dist/typesense-instantsearch-adapter.js.map +++ b/dist/typesense-instantsearch-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense-instantsearch-adapter.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;ACVa;;AAAA;AAAA;AAEN,IAAME,aAAa;EACxB,SAAAA,cAAA,EAA0B;IAAA,IAAAC,qBAAA;MAAAC,qBAAA;MAAAC,IAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC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ACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;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ACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B,mBAAO,CAAC,0DAAO;AAC7C,eAAe,mBAAO,CAAC,wEAAU;AACjC,uCAAuC,mBAAO,CAAC,gGAAyB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,gFAAgF,kCAAkC;AAClH,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,wNAAwN;AACxN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,gEAAgE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,uCAAuC;AAC3G;AACA;AACA,oEAAoE,sIAAsI;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,6CAA6C;AACpH,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC1Ya;AACb;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,6BAA6B,mBAAO,CAAC,8DAAQ;AAC7C,4BAA4B,mBAAO,CAAC,4DAAO;AAC3C,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,qCAAqC,mBAAO,CAAC,8EAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACxHa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,eAAe,mBAAO,CAAC,wEAAU;AACjC,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,iBAAiB,mBAAO,CAAC,sEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACjJa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACpEa;AACb;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,mBAAO,CAAC,yDAAU;AAC5C,eAAe,mBAAO,CAAC,wEAAU;AACjC;AACA;AACA;AACA;AACA;AACA,mCAAmC,0CAA0C;AAC7E,mCAAmC,0CAA0C;AAC7E,mCAAmC,mBAAmB,WAAW,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ia;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B;AACnF;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB;AAC3E,oFAAoF,6BAA6B;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClMa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6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Y,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACtEa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ha;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,6BAA6B,mBAAO,CAAC,8FAAwB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC9Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,4BAA4B;AAC5B;;;;;;;;;;;ACjBa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,i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BAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;AC3EA;;;;;;;;;;ACAA,cAAc,sGAAiC;AAC/C;AACA,gBAAgB;AAChB;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;ACdA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;ACzrGe;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJ+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;;ACF6E;AAC9D;AACf;AACA,eAAe,4EAA4B;AAC3C;AACA;AACA;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA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A,EAED,SAAAmT,WAAA,EAAa;MACX,IAAI,CAACzQ,eAAe,GAAG,IAAIqQ,mDAAqB,CAAC,IAAI,CAACpQ,aAAa,CAAClF,MAAM,CAAC;MAC3E,OAAO,IAAI,CAACyV,YAAY;IAC1B;EAAC;IAAA5T,GAAA;IAAAU,KAAA,EAED,SAAAiT,oBAAoB5V,OAAO,EAAE;MAC3B,IAAI,CAACsF,aAAa,GAAG,IAAI7G,yDAAa,CAACuB,OAAO,CAAC;MAC/C,IAAI,CAACsF,aAAa,CAAC1C,QAAQ,CAAC,CAAC;MAC7B,IAAI,CAACyC,eAAe,GAAG,IAAIqQ,mDAAqB,CAAC,IAAI,CAACpQ,aAAa,CAAClF,MAAM,CAAC;MAC3E,OAAO,IAAI;IACb;EAAC;IAAA6B,GAAA;IAAAU,KAAA,EAED,SAAA8T,yBAAyBD,eAAe,EAAE;MACxC,IAAIA,eAAe,CAAC/P,KAAK,EAAE;QACzB,MAAM,IAAIvD,KAAK,IAAAwD,MAAA,CAAI8P,eAAe,CAACiB,IAAI,SAAA/Q,MAAA,CAAM8P,eAAe,CAAC/P,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAAC+P,eAAe,CAAC9F,IAAI,IAAI,CAAC8F,eAAe,CAACxB,YAAY,EAAE;QAC1D,MAAM,IAAI9R,KAAK,2BAAAwD,MAAA,CAA2B8P,eAAe,CAACiB,IAAI,SAAA/Q,MAAA,CAAM8P,eAAe,CAAC/P,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/ignored|/Users/anthonybachour/typesense/local/typesense-instantsearch-adapter/node_modules/typesense/lib/Typesense|crypto","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/webpack/runtime/make namespace object","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false;\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][\">=\"] > filtersHash[field][\"<=\"]) {\n //exclude unbound range:\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["_classCallCheck","_createClass","Configuration","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","_options$useExcludeFo","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","Object","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","useExcludeForUnboundNumericRange","value","validate","values","some","c","console","warn","Error","utils","FacetSearchResponseAdapter","typesenseResponse","instantsearchRequest","_adaptFacetHits","typesenseFacetCounts","adaptedResult","facet","find","field_name","facetName","counts","map","facetCount","highlighted","_adaptHighlightTag","highlightPreTag","highlightPostTag","count","adapt","facetHits","facet_counts","exhaustiveFacetsCount","processingTimeMS","search_time_ms","assign","prototype","_objectWithoutProperties","_asyncToGenerator","_slicedToArray","_excluded","_regeneratorRuntime","SearchRequestAdapter","instantsearchRequests","typesenseClient","configuration","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","exactMatch","_adaptFacetFilters","facetFilters","transformedTypesenseFilters","item","Array","isArray","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","_this3$configuration$","_buildSearchParameters","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","q","query","facet_by","filter_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","get","_typeof","_toConsumableArray","_defineProperty","ownKeys","e","r","t","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread","getOwnPropertyDescriptors","defineProperties","defineProperty","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","_adaptGroupedHits","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","includes","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","attribute","matchLevel","matchedWords","highlights","matched_tokens","indices","k","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","index","indexOf","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","facetOrdering","order","Set","fc","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","isFinite","Math","ceil","SearchClient","TypesenseSearchClient","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","clearCache","search","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","sent","results","typesenseResult","_validateTypesenseResult","responseAdapter","adaptedResponse","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_callee2$","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","_x3","code","default"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense-instantsearch-adapter.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;ACVa;;AAAA;AAAA;AAEN,IAAME,aAAa;EACxB,SAAAA,cAAA,EAA0B;IAAA,IAAAC,qBAAA;MAAAC,qBAAA;MAAAC,IAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAAC,qBAAA;MAAA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ACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;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ACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACnEa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACtEa;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,kFAAkB;AACjE,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT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U;AACjC,uCAAuC,mBAAO,CAAC,gGAAyB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,gFAAgF,kCAAkC;AAClH,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,wNAAwN;AACxN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,gEAAgE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,uCAAuC;AAC3G;AACA;AACA,oEAAoE,sIAAsI;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,6CAA6C;AACpH,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC1Ya;AACb;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,6BAA6B,mBAAO,CAAC,8DAAQ;AAC7C,4BAA4B,mBAAO,CAAC,4DAAO;AAC3C,8BAA8B,mBAAO,CAAC,gEAAS;AAC/C,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,mCAAmC,mBAAO,CAAC,0EAAc;AACzD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,+BAA+B,mBAAO,CAAC,kEAAU;AACjD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,qCAAqC,mBAAO,CAAC,8EAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACxHa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,eAAe,mBAAO,CAAC,wEAAU;AACjC,kCAAkC,mBAAO,CAAC,wEAAa;AACvD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,iCAAiC,mBAAO,CAAC,sEAAY;AACrD,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,iBAAiB,mBAAO,CAAC,sEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACjJa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CAAmC,0CAA0C;AAC7E,mCAAmC,mBAAmB,WAAW,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ia;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa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A,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,wEAAU;AACjC,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uGAAuG,aAAa,kBAAkB;AACtI,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA,2GAA2G,aAAa,kBAAkB;AAC1I;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,kCAAkC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B;AACnF;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB;AAC3E,oFAAoF,6BAA6B;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClMa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD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A;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACtEa;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;AC3EA;;;;;;;;;;ACAA,cAAc,sGAAiC;AAC/C;AACA,gBAAgB;AAChB;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;ACdA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;ACzrGe;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJ+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;;ACF6E;AAC9D;AACf;AACA,eAAe,4EAA4B;AAC3C;AACA;AACA;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACfe;AACf;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACXiD;AACY;AACY;AACtB;AACpC;AACf,SAAS,8DAAc,SAAS,oEAAoB,YAAY,0EAA0B,YAAY,+DAAe;AACrH;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CAAC;MAC3E,OAAO,IAAI,CAAC0V,YAAY;IAC1B;EAAC;IAAA7T,GAAA;IAAAU,KAAA,EAED,SAAAkT,oBAAoB7V,OAAO,EAAE;MAC3B,IAAI,CAACsF,aAAa,GAAG,IAAI7G,yDAAa,CAACuB,OAAO,CAAC;MAC/C,IAAI,CAACsF,aAAa,CAAC1C,QAAQ,CAAC,CAAC;MAC7B,IAAI,CAACyC,eAAe,GAAG,IAAIsQ,mDAAqB,CAAC,IAAI,CAACrQ,aAAa,CAAClF,MAAM,CAAC;MAC3E,OAAO,IAAI;IACb;EAAC;IAAA6B,GAAA;IAAAU,KAAA,EAED,SAAA+T,yBAAyBD,eAAe,EAAE;MACxC,IAAIA,eAAe,CAAChQ,KAAK,EAAE;QACzB,MAAM,IAAIvD,KAAK,IAAAwD,MAAA,CAAI+P,eAAe,CAACiB,IAAI,SAAAhR,MAAA,CAAM+P,eAAe,CAAChQ,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAACgQ,eAAe,CAAC9F,IAAI,IAAI,CAAC8F,eAAe,CAACxB,YAAY,EAAE;QAC1D,MAAM,IAAI/R,KAAK,2BAAAwD,MAAA,CAA2B+P,eAAe,CAACiB,IAAI,SAAAhR,MAAA,CAAM+P,eAAe,CAAChQ,KAAK,CAAE,CAAC;MAC9F;IACF;EAAC;AAAA","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/ignored|/Users/anthonybachour/typesense/local/typesense-instantsearch-adapter/node_modules/typesense/lib/Typesense|crypto","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/webpack/runtime/make namespace object","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false;\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n // option to exclude unbound ranges \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && parseInt(filtersHash[field][\">=\"]) > parseInt(filtersHash[field][\"<=\"])) {\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["_classCallCheck","_createClass","Configuration","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_this","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","_options$useExcludeFo","options","arguments","length","undefined","server","nodes","host","port","path","protocol","cacheSearchResultsForSeconds","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","Object","keys","forEach","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","params","key","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","useExcludeForUnboundNumericRange","value","validate","values","some","c","console","warn","Error","utils","FacetSearchResponseAdapter","typesenseResponse","instantsearchRequest","_adaptFacetHits","typesenseFacetCounts","adaptedResult","facet","find","field_name","facetName","counts","map","facetCount","highlighted","_adaptHighlightTag","highlightPreTag","highlightPostTag","count","adapt","facetHits","facet_counts","exhaustiveFacetsCount","processingTimeMS","search_time_ms","assign","prototype","_objectWithoutProperties","_asyncToGenerator","_slicedToArray","_excluded","_regeneratorRuntime","SearchRequestAdapter","instantsearchRequests","typesenseClient","configuration","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","exactMatch","_adaptFacetFilters","facetFilters","transformedTypesenseFilters","item","Array","isArray","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","parseInt","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","_this3$configuration$","_buildSearchParameters","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","q","query","facet_by","filter_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","get","_typeof","_toConsumableArray","_defineProperty","ownKeys","e","r","t","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread","getOwnPropertyDescriptors","defineProperties","defineProperty","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","_adaptGroupedHits","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","found","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","document","objectID","id","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","includes","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","attribute","matchLevel","matchedWords","highlights","matched_tokens","indices","k","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","index","indexOf","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","_ref7","adaptedValue","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","_adaptFacets","_adaptFacetStats","stats","_adaptRenderingContent","_adaptedResult$facetO","facetOrdering","order","Set","fc","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","isFinite","Math","ceil","SearchClient","TypesenseSearchClient","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","clearCache","search","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","sent","results","typesenseResult","_validateTypesenseResult","responseAdapter","adaptedResponse","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_callee2$","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_callee3$","_context3","_x3","code","default"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/typesense-instantsearch-adapter.min.js b/dist/typesense-instantsearch-adapter.min.js index a473b1e..bcbe58e 100644 --- a/dist/typesense-instantsearch-adapter.min.js +++ b/dist/typesense-instantsearch-adapter.min.js @@ -1,3 +1,3 @@ /*! For license information please see typesense-instantsearch-adapter.min.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TypesenseInstantSearchAdapter=e():t.TypesenseInstantSearchAdapter=e()}(self,(()=>(()=>{var t={3065:function(t,e,n){var r,o;!function(i,a){"use strict";r=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(e,n){for(var o=0;o=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(t){}}}(n),a.call(s,n,t),typeof console===e&&n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0},transformResponse:[function(t,e){var n=t;return void 0!==e&&"string"==typeof t&&e["content-type"]&&e["content-type"].startsWith("application/json")&&(n=JSON.parse(t)),n}]},!0!==_&&(g.timeout=1e3*h.connectionTimeoutSeconds),f&&0!==Object.keys(f).length&&(g.params=f),h.sendApiKeyAsQueryParam&&(g.params=g.params||{},g.params["x-typesense-api-key"]=h.apiKey),h.configuration.httpAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpAgent")),g.httpAgent=h.configuration.httpAgent),h.configuration.httpsAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpsAgent")),g.httpsAgent=h.configuration.httpsAgent),p&&("string"==typeof p&&0!==p.length||"object"==typeof p&&0!==Object.keys(p).length)&&(g.data=p),b&&(w=a.default.CancelToken,O=w.source(),v=function(){return O.cancel()},b.addEventListener("abort",v),g.cancelToken=O.token),[4,(0,a.default)(g)];case 2:if((S=o.sent()).status>=1&&S.status<=499&&h.setNodeHealthcheck(d,c),h.logger.debug("Request #".concat(n,": Request to Node ").concat(d.index," was made. Response Code was ").concat(S.status,".")),S.status>=200&&S.status<300)return[2,{value:Promise.resolve(S.data)}];if(S.status<500)return[2,{value:Promise.reject(h.customErrorForResponse(S,null===(i=S.data)||void 0===i?void 0:i.message))}];throw h.customErrorForResponse(S,null===(s=S.data)||void 0===s?void 0:s.message);case 3:return P=o.sent(),h.setNodeHealthcheck(d,!1),r=P,h.logger.warn("Request #".concat(n,": Request to Node ").concat(d.index,' failed due to "').concat(P.code," ").concat(P.message).concat(null==P.response?"":" - "+JSON.stringify(null===(u=P.response)||void 0===u?void 0:u.data),'"')),h.logger.warn("Request #".concat(n,": Sleeping for ").concat(h.retryIntervalSeconds,"s and then retrying request...")),[4,h.timer(h.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return b&&v&&b.removeEventListener("abort",v),[7];case 6:return[2]}}))},h=this,d=1,g.label=1;case 1:return d<=this.numRetriesPerRequest+1?[5,l(d)]:[3,4];case 2:if("object"==typeof(v=g.sent()))return[2,v.value];g.label=3;case 3:return d++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(r)]}}))}))},t.prototype.getNextNode=function(t){if(void 0===t&&(t=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(t,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(t,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(t,": Nodes Health: ").concat(this.nodes.map((function(t){return"Node ".concat(t.index," is ").concat(!0===t.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var e=this.nodes[0],n=0;n<=this.nodes.length;n++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(e=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(e,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(e.index)),e;return this.logger.debug("Request #".concat(t,": No healthy nodes were found. Returning the next node, Node ").concat(e.index)),e},t.prototype.nodeDueForHealthcheck=function(t,e){void 0===e&&(e=0);var n=Date.now()-t.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},t.prototype.initializeMetadataForNodes=function(){var t=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,c)),this.nodes.forEach((function(e,n){e.index=n,t.setNodeHealthcheck(e,c)}))},t.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},t.prototype.uriFor=function(t,e){return null!=e.url?"".concat(e.url).concat(t):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path).concat(t)},t.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},t.prototype.timer=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},t.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status);"string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e));var r=new u.default(n);return(r=400===t.status?new s.RequestMalformed(n):401===t.status?new s.RequestUnauthorized(n):404===t.status?new s.ObjectNotFound(n):409===t.status?new s.ObjectAlreadyExists(n):422===t.status?new s.ObjectUnprocessable(n):t.status>=500&&t.status<=599?new s.ServerError(n):new s.HTTPError(n)).httpStatus=t.status,r},t}();e.default=l},5641:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(7361)),s=r(n(2626)),u=r(n(612)),c=r(n(5300)),l=r(n(326)),f=r(n(2275)),h=r(n(3343)),p=r(n(657)),d=r(n(8231)),y=r(n(3684)),v=r(n(8621)),b=r(n(5156)),g=r(n(3777)),m=r(n(800)),w=r(n(3533)),_=r(n(4646)),O=r(n(8700)),S=r(n(8313)),P=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null!==(e=t.sendApiKeyAsQueryParam)&&void 0!==e&&e,this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new p.default(this.apiCall),this.health=new d.default(this.apiCall),this.operations=new y.default(this.apiCall),this.multiSearch=new v.default(this.apiCall,this.configuration),this._collections=new a.default(this.apiCall),this.individualCollections={},this._aliases=new u.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new b.default(this.apiCall),this.individualPresets={},this._stopwords=new w.default(this.apiCall),this.individualStopwords={},this.analytics=new m.default(this.apiCall),this._conversations=new O.default(this.apiCall),this.individualConversations={}}return t.prototype.collections=function(t){return void 0===t?this._collections:(void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.default(t,this.apiCall,this.configuration)),this.individualCollections[t])},t.prototype.aliases=function(t){return void 0===t?this._aliases:(void 0===this.individualAliases[t]&&(this.individualAliases[t]=new c.default(t,this.apiCall)),this.individualAliases[t])},t.prototype.keys=function(t){return void 0===t?this._keys:(void 0===this.individualKeys[t]&&(this.individualKeys[t]=new f.default(t,this.apiCall)),this.individualKeys[t])},t.prototype.presets=function(t){return void 0===t?this._presets:(void 0===this.individualPresets[t]&&(this.individualPresets[t]=new g.default(t,this.apiCall)),this.individualPresets[t])},t.prototype.stopwords=function(t){return void 0===t?this._stopwords:(void 0===this.individualStopwords[t]&&(this.individualStopwords[t]=new _.default(t,this.apiCall)),this.individualStopwords[t])},t.prototype.conversations=function(t){return void 0===t?this._conversations:(void 0===this.individualConversations[t]&&(this.individualConversations[t]=new S.default(t,this.apiCall)),this.individualConversations[t])},t}();e.default=P},2626:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0;n--){var r=Math.floor(Math.random()*(n+1));e=[t[r],t[n]],t[n]=e[0],t[r]=e[1]}},t}();e.default=c},8313:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)throw new s.ImportError("".concat(o.length-i.length," documents imported successfully, ").concat(i.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,r]}}))}))},e.prototype.export=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t)]}))}))},e.prototype.exportStream=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t,{responseType:"stream"})]}))}))},e}(n(6124).SearchOnlyDocuments);e.default=u},2144:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8331:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.importResults=n,r}return o(e,t),e}(i(n(7796)).default);e.default=a},2426:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6731:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8280:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},2703:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8274:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6909:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},1081:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},7796:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.name=n.name,Object.setPrototypeOf(r,n.prototype),r}return r(e,t),e}(Error);e.default=o},4410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImportError=e.TypesenseError=e.ServerError=e.RequestUnauthorized=e.RequestMalformed=e.ObjectUnprocessable=e.ObjectNotFound=e.ObjectAlreadyExists=e.MissingConfigurationError=e.HTTPError=void 0;var o=r(n(2144));e.HTTPError=o.default;var i=r(n(2426));e.MissingConfigurationError=i.default;var a=r(n(6731));e.ObjectAlreadyExists=a.default;var s=r(n(8280));e.ObjectNotFound=s.default;var u=r(n(2703));e.ObjectUnprocessable=u.default;var c=r(n(8274));e.RequestMalformed=c.default;var l=r(n(6909));e.RequestUnauthorized=l.default;var f=r(n(1081));e.ServerError=f.default;var h=r(n(8331));e.ImportError=h.default;var p=r(n(7796));e.TypesenseError=p.default},8231:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]c&&(v=this.responseCache.keys().next().value,this.responseCache.delete(v)),this.responsePromiseCache.size>c&&(v=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(v)),[2,y]}}))}))},t}();e.default=i},8557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(8621)),s=n(7112),u=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null===(e=t.sendApiKeyAsQueryParam)||void 0===e||e,!0===t.sendApiKeyAsQueryParam&&(t.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),t.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return t.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(t){t[0],t[1].documents().clearCache()}))},t.prototype.collections=function(t){if(t)return void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.SearchOnlyCollection(t,this.apiCall,this.configuration)),this.individualCollections[t];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},t}();e.default=u},7112:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchOnlyCollection=void 0;var r=n(6124),o=function(){function t(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return t.prototype.documents=function(){return this._documents},t}();e.SearchOnlyCollection=o},6124:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{},4633:(t,e,n)=>{var r=n(3738).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new N(r||[]);return s(i,"_invoke",{value:j(t,n,a)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",v="suspendedYield",b="executing",g="completed",m={};function w(){}function _(){}function O(){}var S={};h(S,c,(function(){return this}));var P=Object.getPrototypeOf,E=P&&P(P(F([])));E&&E!==i&&a.call(E,c)&&(S=E);var C=O.prototype=w.prototype=Object.create(S);function x(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(o,i,s,u){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var o=y;return function(i,a){if(o===b)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=T(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=b;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},3738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:(t,e,n)=>{var r=n(4633)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6425:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(s=Object.create(null),t=>{const e=o.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const u=t=>(t=t.toLowerCase(),e=>a(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,f=c("undefined"),h=u("ArrayBuffer"),p=c("string"),d=c("function"),y=c("number"),v=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=u("Date"),m=u("File"),w=u("Blob"),_=u("FileList"),O=u("URLSearchParams");function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,o=t.length;r0;)if(r=n[o],e===r.toLowerCase())return r;return null}const E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,C=t=>!f(t)&&t!==E,x=(R="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>R&&t instanceof R);var R;const j=u("HTMLFormElement"),T=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),k=u("RegExp"),A=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};S(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},N="abcdefghijklmnopqrstuvwxyz",F="0123456789",M={DIGIT:F,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+F},U=u("AsyncFunction");var q={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:b,isUndefined:f,isDate:g,isFile:m,isBlob:w,isRegExp:k,isFunction:d,isStream:t=>v(t)&&d(t.pipe),isURLSearchParams:O,isTypedArray:x,isFileList:_,forEach:S,merge:function t(){const{caseless:e}=C(this)&&this||{},n={},r=(r,o)=>{const i=e&&P(n,o)||o;b(n[i])&&b(r)?n[i]=t(n[i],r):b(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t(S(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)s=o[a],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:A,freezeMethods:t=>{A(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:P,global:E,isContextDefined:C,ALPHABET:M,generateString:(t=16,e=M.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=l(t)?[]:{};return S(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:U,isThenable:t=>t&&(v(t)||d(t))&&d(t.then)&&d(t.catch)};function H(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}q.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const L=H.prototype,D={};function I(t){return q.isPlainObject(t)||q.isArray(t)}function B(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function G(t,e,n){return t?t.concat(e).map((function(t,e){return t=B(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{D[t]={value:t}})),Object.defineProperties(H,D),Object.defineProperty(L,"isAxiosError",{value:!0}),H.from=(t,e,n,r,o,i)=>{const a=Object.create(L);return q.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),H.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const V=q.toFlatObject(q,{},null,(function(t){return/^is[A-Z]/.test(t)}));function W(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!q.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(q.isDate(t))return t.toISOString();if(!s&&q.isBlob(t))throw new H("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(t)||q.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,o){let s=t;if(t&&!o&&"object"==typeof t)if(q.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(q.isArray(t)&&function(t){return q.isArray(t)&&!t.some(I)}(t)||(q.isFileList(t)||q.endsWith(n,"[]"))&&(s=q.toArray(t)))return n=B(n),s.forEach((function(t,r){!q.isUndefined(t)&&null!==t&&e.append(!0===a?G([n],r,i):null===a?n:n+"[]",u(t))})),!1;return!!I(t)||(e.append(G(o,n,i),u(t)),!1)}const l=[],f=Object.assign(V,{defaultVisitor:c,convertValue:u,isVisitable:I});if(!q.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!q.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),q.forEach(n,(function(n,i){!0===(!(q.isUndefined(n)||null===n)&&o.call(e,n,q.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function K(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function z(t,e){this._pairs=[],t&&W(t,this,e)}const J=z.prototype;function Q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||Q,o=n&&n.serialize;let i;if(i=o?o(e,n):q.isURLSearchParams(e)?e.toString():new z(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}J.append=function(t,e){this._pairs.push([t,e])},J.toString=function(t){const e=t?function(e){return t.call(this,e,K)}:K;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var $=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const tt="undefined"!=typeof window&&"undefined"!=typeof document,et=(nt="undefined"!=typeof navigator&&navigator.product,tt&&["ReactNative","NativeScript","NS"].indexOf(nt)<0);var nt;const rt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ot={...Object.freeze({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:rt,hasStandardBrowserEnv:et}),...Z};function it(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&q.isArray(r)?r.length:i,s?(q.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&q.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&q.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r{e(function(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const at={transitional:Y,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return r?JSON.stringify(it(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return W(t,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return ot.isNode&&q.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return W(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(q.isString(t))try{return(0,JSON.parse)(t),q.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||at.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&q.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw H.from(t,H.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],(t=>{at.headers[t]={}}));var st=at;const ut=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ct=Symbol("internals");function lt(t){return t&&String(t).trim().toLowerCase()}function ft(t){return!1===t||null==t?t:q.isArray(t)?t.map(ft):String(t)}function ht(t,e,n,r,o){return q.isFunction(r)?r.call(this,e,n):(o&&(e=n),q.isString(e)?q.isString(r)?-1!==e.indexOf(r):q.isRegExp(r)?r.test(e):void 0:void 0)}class pt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=lt(e);if(!o)throw new Error("header name must be a non-empty string");const i=q.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=ft(t))}const i=(t,e)=>q.forEach(t,((t,n)=>o(t,n,e)));return q.isPlainObject(t)||t instanceof this.constructor?i(t,e):q.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&ut[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=lt(t)){const n=q.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(q.isFunction(e))return e.call(this,t,n);if(q.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=lt(t)){const n=q.findKey(this,t);return!(!n||void 0===this[n]||e&&!ht(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=lt(t)){const o=q.findKey(n,t);!o||e&&!ht(0,n[o],o,e)||(delete n[o],r=!0)}}return q.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!ht(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return q.forEach(this,((r,o)=>{const i=q.findKey(n,o);if(i)return e[i]=ft(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=ft(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return q.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&q.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ct]=this[ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=lt(t);e[r]||(function(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return q.isArray(t)?t.forEach(r):r(t),this}}pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(pt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),q.freezeMethods(pt);var dt=pt;function yt(t,e){const n=this||st,r=e||n,o=dt.from(r.headers);let i=r.data;return q.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function vt(t){return!(!t||!t.__CANCEL__)}function bt(t,e,n){H.call(this,null==t?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(bt,H,{__CANCEL__:!0});var gt=ot.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),q.isString(r)&&a.push("path="+r),q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var wt=ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=q.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function _t(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Ot={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=dt.from(t.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(q.isFormData(r))if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=mt(t.baseURL,t.url);function h(){if(!l)return;const r=dt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),c()}),(function(t){n(t),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new H("Request aborted",H.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new H("Network Error",H.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Y;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new H(e,r.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,l)),l=null},ot.hasStandardBrowserEnv&&(u&&q.isFunction(u)&&(u=u(t)),u||!1!==u&&wt(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&>.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&q.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),q.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",_t(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new bt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);p&&-1===ot.protocols.indexOf(p)?n(new H("Unsupported protocol "+p+":",H.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};q.forEach(Ot,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St=t=>`- ${t}`,Pt=t=>q.isFunction(t)||null===t||!1===t;var Et=t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new H("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(St).join("\n"):" "+St(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ct(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new bt(null,t)}function xt(t){return Ct(t),t.headers=dt.from(t.headers),t.data=yt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Et(t.adapter||st.adapter)(t).then((function(e){return Ct(t),e.data=yt.call(t,t.transformResponse,e),e.headers=dt.from(e.headers),e}),(function(e){return vt(e)||(Ct(t),e&&e.response&&(e.response.data=yt.call(t,t.transformResponse,e.response),e.response.headers=dt.from(e.response.headers))),Promise.reject(e)}))}const Rt=t=>t instanceof dt?{...t}:t;function jt(t,e){e=e||{};const n={};function r(t,e,n){return q.isPlainObject(t)&&q.isPlainObject(e)?q.merge.call({caseless:n},t,e):q.isPlainObject(e)?q.merge({},e):q.isArray(e)?e.slice():e}function o(t,e,n){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!q.isUndefined(e))return r(void 0,e)}function a(t,e){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=u[r]||o,a=i(t[r],e[r],r);q.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Tt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Tt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const kt={};Tt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new H(r(o," has been removed"+(e?" in "+e:"")),H.ERR_DEPRECATED);return e&&!kt[o]&&(kt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};var At={assertOptions:function(t,e,n){if("object"!=typeof t)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new H("option "+i+" must be "+n,H.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new H("Unknown option "+i,H.ERR_BAD_OPTION)}},validators:Tt};const Nt=At.validators;class Ft{constructor(t){this.defaults=t,this.interceptors={request:new $,response:new $}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&At.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),null!=r&&(q.isFunction(r)?e.paramsSerializer={serialize:r}:At.assertOptions(r,{encode:Nt.function,serialize:Nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&q.merge(o.common,o[e.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=dt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[xt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new bt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Ut((function(e){t=e})),cancel:t}}}var qt=Ut;const Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((([t,e])=>{Ht[e]=t}));var Lt=Ht;const Dt=function t(e){const n=new Mt(e),o=r(Mt.prototype.request,n);return q.extend(o,Mt.prototype,n,{allOwnKeys:!0}),q.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(jt(e,n))},o}(st);Dt.Axios=Mt,Dt.CanceledError=bt,Dt.CancelToken=qt,Dt.isCancel=vt,Dt.VERSION="1.6.8",Dt.toFormData=W,Dt.AxiosError=H,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=function(t){return function(e){return t.apply(null,e)}},Dt.isAxiosError=function(t){return q.isObject(t)&&!0===t.isAxiosError},Dt.mergeConfig=jt,Dt.AxiosHeaders=dt,Dt.formToJSON=t=>it(q.isHTMLForm(t)?new FormData(t):t),Dt.getAdapter=Et,Dt.HttpStatusCode=Lt,Dt.default=Dt,t.exports=Dt}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e){for(var n=0;nC});var c=n(4756),l=n.n(c),f=function(){return u((function t(){var e,n,r,i,a,s,u,c,l,f,h,p,d,y,v,b,g,m,w,_,O,S=this,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.server=P.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(e=this.server.cacheSearchResultsForSeconds)&&void 0!==e?e:120,this.additionalSearchParameters=null!==(n=P.additionalSearchParameters)&&void 0!==n?n:{},this.additionalSearchParameters.query_by=null!==(r=null!==(i=this.additionalSearchParameters.queryBy)&&void 0!==i?i:this.additionalSearchParameters.query_by)&&void 0!==r?r:"",this.additionalSearchParameters.preset=null!==(a=null!==(s=this.additionalSearchParameters.preset)&&void 0!==s?s:this.additionalSearchParameters.preset)&&void 0!==a?a:"",this.additionalSearchParameters.sort_by=null!==(u=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==u?u:"",this.additionalSearchParameters.highlight_full_fields=null!==(l=null!==(f=this.additionalSearchParameters.highlightFullFields)&&void 0!==f?f:this.additionalSearchParameters.highlight_full_fields)&&void 0!==l?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=P.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=P.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=P.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=S.collectionSpecificSearchParameters[t];s.query_by=null!==(e=s.queryBy)&&void 0!==e?e:s.query_by,s.preset=null!==(n=s.preset)&&void 0!==n?n:s.preset,s.sort_by=null!==(r=s.sortBy)&&void 0!==r?r:s.sort_by,s.highlight_full_fields=null!==(o=null!==(i=null!==(a=s.highlightFullFields)&&void 0!==a?a:s.highlight_full_fields)&&void 0!==i?i:S.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:s.query_by,Object.keys(s).forEach((function(t){return void 0===s[t]?delete s[t]:{}}))})),this.renderingContent=P.renderingContent,this.flattenGroupedHits=null===(y=P.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=P.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(b=P.filterByOptions)&&void 0!==b?b:{},this.sortByOptions=null!==(g=P.sortByOptions)&&void 0!==g?g:{},this.collectionSpecificFacetByOptions=null!==(m=P.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(w=P.collectionSpecificFilterByOptions)&&void 0!==w?w:{},this.collectionSpecificSortByOptions=null!==(_=P.collectionSpecificSortByOptions)&&void 0!==_?_:{},this.useExcludeForUnboundNumericRange=null!==(O=P.useExcludeForUnboundNumericRange)&&void 0!==O&&O}),[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(t){return t.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(t){return 0===(t.query_by||"").length&&0===(t.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])}(),h=n(8567);function p(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(r).join(",")));var o=Object.keys(r)[0],i=r[o].reduce((function(t,e){return e.startsWith("-")&&!n._isNumber(e)?t[0].push(e.substring(1)):t[1].push(e),t}),[[],[]]),a=v(i,2),s=a[0],u=a[1],c=[];if(u.length>0){var l=n._shouldUseExactMatchForField(o,e)?":=":":";c.push("".concat(o).concat(l,"[").concat(u.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}if(s.length>0){var f=n._shouldUseExactMatchForField(o,e)?":!=":":!";c.push("".concat(o).concat(f,"[").concat(s.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}return c.filter((function(t){return t})).join(" && ")}var h,p=n._parseFacetFilter(t),d=p.fieldName,y=p.fieldValue;if(y.startsWith("-")&&!n._isNumber(y)){var b=n._shouldUseExactMatchForField(d,e)?":!=":":!";h="".concat(d).concat(b,"[").concat(n._escapeFacetValue(y.substring(1)),"]")}else{var g=n._shouldUseExactMatchForField(d,e)?":=":":";h="".concat(d).concat(g,"[").concat(n._escapeFacetValue(y),"]")}return h})).join(" && "):r}},{key:"_parseFacetFilter",value:function(t){var e,n,r,o,i;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(r=t.match(n)))return{fieldName:o="".concat(r[1]),fieldValue:i="".concat(r[2])}}return n=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(r[1]).concat(r[2]),i="".concat(r[3])),{fieldName:o,fieldValue:i}}},{key:"_escapeFacetValue",value:function(t){return"boolean"==typeof t||"true"===t||"false"===t||this._isNumber(t)?t:"`".concat(t,"`")}},{key:"_isNumber",value:function(t){return Number.isInteger(t%1)||!!(t%1)}},{key:"_adaptNumericFilters",value:function(t){var e=this,n="";if(!t)return n;var r={};t.forEach((function(t){var n=e._parseNumericFilter(t),o=n.fieldName,i=n.operator,a=n.fieldValue;r[o]=r[o]||{},r[o][i]=a}));var o=[];return Object.keys(r).forEach((function(t){null!=r[t]["<="]&&null!=r[t][">="]?e.configuration.useExcludeForUnboundNumericRange&&r[t][">="]>r[t]["<="]?o.push("".concat(t,":!=[").concat(r[t]["<="],"..").concat(r[t][">="],"]")):o.push("".concat(t,":=[").concat(r[t][">="],"..").concat(r[t]["<="],"]")):null!=r[t]["<="]?o.push("".concat(t,":<=").concat(r[t]["<="])):null!=r[t][">="]?o.push("".concat(t,":>=").concat(r[t][">="])):null!=r[t]["="]?o.push("".concat(t,":=").concat(r[t]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(r[t])))})),o.join(" && ")}},{key:"_parseNumericFilter",value:function(t){var e,n,r,o,i,a;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(r=t.match(n))){var u=v(r,4);return{fieldName:o=u[1],operator:i=u[2],fieldValue:a=u[3]}}}if(n=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var c=v(r,4);o=c[1],i=c[2],a=c[3]}return{fieldName:o,operator:i,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(t){var e=t.insideBoundingBox,n=t.aroundRadius,r=t.aroundLatLng,o=t.insidePolygon;if(e){var i,a,s,u;if(Array.isArray(e)){var c=v(e.flat(),4);i=c[0],a=c[1],s=c[2],u=c[3]}else{var l=v(e.split(","),4);i=l[0],a=l[1],s=l[2],u=l[3]}return"".concat(this.configuration.geoLocationField,":(").concat(i,", ").concat(a,", ").concat(i,", ").concat(u,", ").concat(s,", ").concat(u,", ").concat(s,", ").concat(a,")")}if(r||n){if(!n||"all"===n)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var f="".concat(parseFloat(n)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(r,", ").concat(f,")")}if(o){var h=o;return Array.isArray(o)&&(h=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(h,")")}}},{key:"_adaptFilters",value:function(t,e){var n=[];return t.filters&&n.push(t.filters),n.push(this._adaptFacetFilters(t.facetFilters,e)),n.push(this._adaptNumericFilters(t.numericFilters)),n.push(this._adaptGeoFilter(t)),n.filter((function(t){return t&&""!==t})).join(" && ")}},{key:"_adaptIndexName",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(t,e){var n=this;return[t].flat().map((function(t){var r;return null!==(r=n.configuration.collectionSpecificFacetByOptions)&&void 0!==r&&null!==(r=r[e])&&void 0!==r&&r[t]?"".concat(t).concat(n.configuration.collectionSpecificFacetByOptions[e][t]):n.configuration.facetByOptions[t]?"".concat(t).concat(n.configuration.facetByOptions[t]):t})).join(",")}},{key:"_buildSearchParameters",value:function(t){for(var e,n,r=t.params,o=t.indexName,i=this._adaptIndexName(o),a={},s=0,u=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]);var t}();function m(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _={_adaptHighlightTag:function(t,e,n){return t.replace(new RegExp("","g"),e||"").replace(new RegExp("","g"),n||"")},_adaptNumberOfPages:function(){var t=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(t)?Math.ceil(t):1}};function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n,this.configuration=r,this.allTypesenseResults=i,this.fullTypesenseResponse=a}),[{key:"_adaptGroupedHits",value:function(t){var e=this,n=[];return n=t.map((function(t){var n=e._adaptHits(t.hits);return n.forEach((function(e){e.group_key=e._group_key=t.group_key,t.found&&(e._group_found=t.found)})),n})),this.configuration.flattenGroupedHits?n.flat():n.map((function(t){return S(S({},t[0]),{},{_grouped_hits:t})}))}},{key:"_adaptHits",value:function(t){var e=this;return t.map((function(t){var n=S({},t.document);n.objectID=t.document.id,n._snippetResult=e._adaptHighlightResult(t,"snippet"),n._highlightResult=e._adaptHighlightResult(t,"value"),n._rawTypesenseHit=t,e.fullTypesenseResponse.conversation&&(n._rawTypesenseConversation=e.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(e){Object.keys(t).includes(e)&&!Object.keys(n).includes(e)&&(n[e]=t[e])}));var r=n[e.configuration.geoLocationField];return r&&(n._geoloc={lat:r[0],lng:r[1]}),n}))}},{key:"_adaptHighlightResult",value:function(t,e){var n={};return null!=t.highlight&&this.isHighlightPost0240RCN32Format(t.highlight)?this.adaptHighlightObject(t,n,e):this.adaptHighlightsArray(t,n,e),n}},{key:"isHighlightPost0240RCN32Format",value:function(t){return null==t.full&&null==t.snippet}},{key:"adaptHighlightsArray",value:function(t,e,n){var r=this;Object.assign.apply(Object,[e].concat(m(Object.entries(t.document).map((function(t){var e=v(t,2);return w({},e[0],{value:e[1],matchLevel:"none",matchedWords:[]})}))))),t.highlights.forEach((function(t){e[t.field]={value:t[n]||t["".concat(n,"s")],matchLevel:"full",matchedWords:t.matched_tokens},t.indices&&(e[t.field].matchedIndices=t.indices)})),Object.entries(e).forEach((function(o){var a=v(o,2),s=a[0],u=a[1],c=s,l=u.value,f=u.matchLevel,h=u.matchedWords,p=u.matchedIndices;null==l?e[c]=r._adaptHighlightNullValue():Array.isArray(l)?(e[c]=[],t.document[c].forEach((function(t,o){p&&p.includes(o)?e[c].push({value:r._adaptHighlightTag("".concat(l[p.indexOf(o)]),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag),matchLevel:f,matchedWords:h[o]}):"object"===i(t)?e[c].push(r._adaptHighlightInObjectValue(t,{},n)):e[c].push({value:"".concat(t),matchLevel:"none",matchedWords:[]})}))):"object"===i(l)?e[c]=r._adaptHighlightInObjectValue(l,{},n):e[c].value=r._adaptHighlightTag("".concat(l),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(t,e,n){Object.assign(e,this._adaptHighlightInObjectValue(t.document,t.highlight,n))}},{key:"_adaptHighlightInObjectValue",value:function(t,e,n){var r=this;return Object.assign.apply(Object,[{}].concat(m(Object.entries(t).map((function(t){var o,a=v(t,2),s=a[0],u=a[1];if(null==u)o=r._adaptHighlightNullValue();else if(Array.isArray(u)){var c;o=r._adaptHighlightInArrayValue(u,null!==(c=null==e?void 0:e[s])&&void 0!==c?c:[],n)}else if("object"===i(u)){var l;o=r._adaptHighlightInObjectValue(u,null!==(l=null==e?void 0:e[s])&&void 0!==l?l:{},n)}else o=r._adaptHighlightInPrimitiveValue(u,null==e?void 0:e[s],n);return w({},s,o)})))))}},{key:"_adaptHighlightInArrayValue",value:function(t,e,n){var r=this;return t.map((function(t,o){var a;if(null==t)a=r._adaptHighlightNullValue();else if(Array.isArray(t)){var s;a=r._adaptHighlightInArrayValue(t,null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],n)}else if("object"===i(t)){var u;a=r._adaptHighlightInObjectValue(t,null!==(u=null==e?void 0:e[o])&&void 0!==u?u:{},n)}else a=r._adaptHighlightInPrimitiveValue(t,null==e?void 0:e[o],n);return a}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(t,e,n){var r,o;return null!=e?{value:this._adaptHighlightTag("".concat(null!==(r=null!==(o=e[n])&&void 0!==o?o:e.highlight)&&void 0!==r?r:e.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(e.matched_tokens||[]).length>0?"full":"none",matchedWords:e.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(t),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(t){var e={};return t.forEach((function(t){Object.assign(e,w({},t.field_name,Object.assign.apply(Object,[{}].concat(m(t.counts.map((function(t){return w({},t.value,t.count)})))))))})),e}},{key:"_adaptFacetStats",value:function(t){var e={};return t.forEach((function(t){Object.keys(t.stats).length>0&&Object.assign(e,w({},t.field_name,t.stats))})),e}},{key:"_adaptRenderingContent",value:function(t){var e,n=Object.assign({},this.configuration.renderingContent);return null==(null===(e=n.facetOrdering)||void 0===e||null===(e=e.facets)||void 0===e?void 0:e.order)&&(n.facetOrdering=n.facetOrdering||{},n.facetOrdering.facets=n.facetOrdering.facets||{},n.facetOrdering.facets.order=m(new Set(t.map((function(t){return t.field_name})).concat(this.allTypesenseResults.map((function(t){return t.facet_counts||[]})).flat().map((function(t){return t.field_name})).filter((function(t){return t})))))),n}},{key:"adapt",value:function(){var t=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),e=S({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(t).length>0?{renderingContent:t}:null);return this.fullTypesenseResponse.conversation&&0===e.hits.length&&(e.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),e}}])}();Object.assign(P.prototype,_);var E=function(){return u((function t(e,n){o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n}),[{key:"_adaptFacetHits",value:function(t){var e=this;return t.find((function(t){return t.field_name===e.instantsearchRequest.params.facetName})).counts.map((function(t){return{value:t.value,highlighted:e._adaptHighlightTag(t.highlighted,e.instantsearchRequest.params.highlightPreTag,e.instantsearchRequest.params.highlightPostTag),count:t.count}}))}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])}();Object.assign(E.prototype,_);var C=function(){return u((function t(e){var n=this;o(this,t),this.updateConfiguration(e),this.searchClient={clearCache:function(){return n.clearCache()},search:function(t){return n.searchTypesenseAndAdapt(t)},searchForFacetValues:function(t){return n.searchTypesenseForFacetValuesAndAdapt(t)}}}),[{key:"searchTypesenseAndAdapt",value:(r=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,r){return o._validateTypesenseResult(t),new P(t,e[r],o.configuration,n.results,n).adapt()})),t.abrupt("return",{results:r});case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return r.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(n=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,n){return o._validateTypesenseResult(t),new E(t,e[n],o.configuration).adapt()})),t.abrupt("return",r);case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return n.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(t=e(l().mark((function t(e){var n,r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new g(e,this.typesenseClient,this.configuration),t.next=3,n.request();case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new h.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(t){return this.configuration=new f(t),this.configuration.validate(),this.typesenseClient=new h.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(t){if(t.error)throw new Error("".concat(t.code," - ").concat(t.error));if(!t.hits&&!t.grouped_hits)throw new Error("Did not find any hits. ".concat(t.code," - ").concat(t.error))}}]);var t,n,r}()})(),r.default})())); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TypesenseInstantSearchAdapter=e():t.TypesenseInstantSearchAdapter=e()}(self,(()=>(()=>{var t={3065:function(t,e,n){var r,o;!function(i,a){"use strict";r=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(e,n){for(var o=0;o=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(t){}}}(n),a.call(s,n,t),typeof console===e&&n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0},transformResponse:[function(t,e){var n=t;return void 0!==e&&"string"==typeof t&&e["content-type"]&&e["content-type"].startsWith("application/json")&&(n=JSON.parse(t)),n}]},!0!==_&&(g.timeout=1e3*h.connectionTimeoutSeconds),f&&0!==Object.keys(f).length&&(g.params=f),h.sendApiKeyAsQueryParam&&(g.params=g.params||{},g.params["x-typesense-api-key"]=h.apiKey),h.configuration.httpAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpAgent")),g.httpAgent=h.configuration.httpAgent),h.configuration.httpsAgent&&(h.logger.debug("Request #".concat(n,": Using custom httpsAgent")),g.httpsAgent=h.configuration.httpsAgent),p&&("string"==typeof p&&0!==p.length||"object"==typeof p&&0!==Object.keys(p).length)&&(g.data=p),b&&(w=a.default.CancelToken,O=w.source(),v=function(){return O.cancel()},b.addEventListener("abort",v),g.cancelToken=O.token),[4,(0,a.default)(g)];case 2:if((S=o.sent()).status>=1&&S.status<=499&&h.setNodeHealthcheck(d,c),h.logger.debug("Request #".concat(n,": Request to Node ").concat(d.index," was made. Response Code was ").concat(S.status,".")),S.status>=200&&S.status<300)return[2,{value:Promise.resolve(S.data)}];if(S.status<500)return[2,{value:Promise.reject(h.customErrorForResponse(S,null===(i=S.data)||void 0===i?void 0:i.message))}];throw h.customErrorForResponse(S,null===(s=S.data)||void 0===s?void 0:s.message);case 3:return P=o.sent(),h.setNodeHealthcheck(d,!1),r=P,h.logger.warn("Request #".concat(n,": Request to Node ").concat(d.index,' failed due to "').concat(P.code," ").concat(P.message).concat(null==P.response?"":" - "+JSON.stringify(null===(u=P.response)||void 0===u?void 0:u.data),'"')),h.logger.warn("Request #".concat(n,": Sleeping for ").concat(h.retryIntervalSeconds,"s and then retrying request...")),[4,h.timer(h.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return b&&v&&b.removeEventListener("abort",v),[7];case 6:return[2]}}))},h=this,d=1,g.label=1;case 1:return d<=this.numRetriesPerRequest+1?[5,l(d)]:[3,4];case 2:if("object"==typeof(v=g.sent()))return[2,v.value];g.label=3;case 3:return d++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(r)]}}))}))},t.prototype.getNextNode=function(t){if(void 0===t&&(t=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(t,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(t,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(t,": Nodes Health: ").concat(this.nodes.map((function(t){return"Node ".concat(t.index," is ").concat(!0===t.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var e=this.nodes[0],n=0;n<=this.nodes.length;n++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(e=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(e,t))return this.logger.debug("Request #".concat(t,": Updated current node to Node ").concat(e.index)),e;return this.logger.debug("Request #".concat(t,": No healthy nodes were found. Returning the next node, Node ").concat(e.index)),e},t.prototype.nodeDueForHealthcheck=function(t,e){void 0===e&&(e=0);var n=Date.now()-t.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},t.prototype.initializeMetadataForNodes=function(){var t=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,c)),this.nodes.forEach((function(e,n){e.index=n,t.setNodeHealthcheck(e,c)}))},t.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},t.prototype.uriFor=function(t,e){return null!=e.url?"".concat(e.url).concat(t):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path).concat(t)},t.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},t.prototype.timer=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},t.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status);"string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e));var r=new u.default(n);return(r=400===t.status?new s.RequestMalformed(n):401===t.status?new s.RequestUnauthorized(n):404===t.status?new s.ObjectNotFound(n):409===t.status?new s.ObjectAlreadyExists(n):422===t.status?new s.ObjectUnprocessable(n):t.status>=500&&t.status<=599?new s.ServerError(n):new s.HTTPError(n)).httpStatus=t.status,r},t}();e.default=l},5641:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(7361)),s=r(n(2626)),u=r(n(612)),c=r(n(5300)),l=r(n(326)),f=r(n(2275)),h=r(n(3343)),p=r(n(657)),d=r(n(8231)),y=r(n(3684)),v=r(n(8621)),b=r(n(5156)),g=r(n(3777)),m=r(n(800)),w=r(n(3533)),_=r(n(4646)),O=r(n(8700)),S=r(n(8313)),P=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null!==(e=t.sendApiKeyAsQueryParam)&&void 0!==e&&e,this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new p.default(this.apiCall),this.health=new d.default(this.apiCall),this.operations=new y.default(this.apiCall),this.multiSearch=new v.default(this.apiCall,this.configuration),this._collections=new a.default(this.apiCall),this.individualCollections={},this._aliases=new u.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new b.default(this.apiCall),this.individualPresets={},this._stopwords=new w.default(this.apiCall),this.individualStopwords={},this.analytics=new m.default(this.apiCall),this._conversations=new O.default(this.apiCall),this.individualConversations={}}return t.prototype.collections=function(t){return void 0===t?this._collections:(void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.default(t,this.apiCall,this.configuration)),this.individualCollections[t])},t.prototype.aliases=function(t){return void 0===t?this._aliases:(void 0===this.individualAliases[t]&&(this.individualAliases[t]=new c.default(t,this.apiCall)),this.individualAliases[t])},t.prototype.keys=function(t){return void 0===t?this._keys:(void 0===this.individualKeys[t]&&(this.individualKeys[t]=new f.default(t,this.apiCall)),this.individualKeys[t])},t.prototype.presets=function(t){return void 0===t?this._presets:(void 0===this.individualPresets[t]&&(this.individualPresets[t]=new g.default(t,this.apiCall)),this.individualPresets[t])},t.prototype.stopwords=function(t){return void 0===t?this._stopwords:(void 0===this.individualStopwords[t]&&(this.individualStopwords[t]=new _.default(t,this.apiCall)),this.individualStopwords[t])},t.prototype.conversations=function(t){return void 0===t?this._conversations:(void 0===this.individualConversations[t]&&(this.individualConversations[t]=new S.default(t,this.apiCall)),this.individualConversations[t])},t}();e.default=P},2626:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0;n--){var r=Math.floor(Math.random()*(n+1));e=[t[r],t[n]],t[n]=e[0],t[r]=e[1]}},t}();e.default=c},8313:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)throw new s.ImportError("".concat(o.length-i.length," documents imported successfully, ").concat(i.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,r]}}))}))},e.prototype.export=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t)]}))}))},e.prototype.exportStream=function(t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.apiCall.get(this.endpointPath("export"),t,{responseType:"stream"})]}))}))},e}(n(6124).SearchOnlyDocuments);e.default=u},2144:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8331:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.importResults=n,r}return o(e,t),e}(i(n(7796)).default);e.default=a},2426:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6731:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8280:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},2703:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},8274:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},6909:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},1081:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i(n(7796)).default);e.default=a},7796:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.name=n.name,Object.setPrototypeOf(r,n.prototype),r}return r(e,t),e}(Error);e.default=o},4410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImportError=e.TypesenseError=e.ServerError=e.RequestUnauthorized=e.RequestMalformed=e.ObjectUnprocessable=e.ObjectNotFound=e.ObjectAlreadyExists=e.MissingConfigurationError=e.HTTPError=void 0;var o=r(n(2144));e.HTTPError=o.default;var i=r(n(2426));e.MissingConfigurationError=i.default;var a=r(n(6731));e.ObjectAlreadyExists=a.default;var s=r(n(8280));e.ObjectNotFound=s.default;var u=r(n(2703));e.ObjectUnprocessable=u.default;var c=r(n(8274));e.RequestMalformed=c.default;var l=r(n(6909));e.RequestUnauthorized=l.default;var f=r(n(1081));e.ServerError=f.default;var h=r(n(8331));e.ImportError=h.default;var p=r(n(7796));e.TypesenseError=p.default},8231:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]c&&(v=this.responseCache.keys().next().value,this.responseCache.delete(v)),this.responsePromiseCache.size>c&&(v=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(v)),[2,y]}}))}))},t}();e.default=i},8557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(5706)),i=r(n(5996)),a=r(n(8621)),s=n(7112),u=function(){function t(t){var e;t.sendApiKeyAsQueryParam=null===(e=t.sendApiKeyAsQueryParam)||void 0===e||e,!0===t.sendApiKeyAsQueryParam&&(t.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),t.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(t),this.apiCall=new i.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return t.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(t){t[0],t[1].documents().clearCache()}))},t.prototype.collections=function(t){if(t)return void 0===this.individualCollections[t]&&(this.individualCollections[t]=new s.SearchOnlyCollection(t,this.apiCall,this.configuration)),this.individualCollections[t];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},t}();e.default=u},7112:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchOnlyCollection=void 0;var r=n(6124),o=function(){function t(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return t.prototype.documents=function(){return this._documents},t}();e.SearchOnlyCollection=o},6124:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{},4633:(t,e,n)=>{var r=n(3738).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new N(r||[]);return s(i,"_invoke",{value:j(t,n,a)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",v="suspendedYield",b="executing",g="completed",m={};function w(){}function _(){}function O(){}var S={};h(S,c,(function(){return this}));var P=Object.getPrototypeOf,E=P&&P(P(F([])));E&&E!==i&&a.call(E,c)&&(S=E);var C=O.prototype=w.prototype=Object.create(S);function x(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(o,i,s,u){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,n,r){var o=y;return function(i,a){if(o===b)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=T(s,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=b;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},3738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:(t,e,n)=>{var r=n(4633)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6425:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(s=Object.create(null),t=>{const e=o.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const u=t=>(t=t.toLowerCase(),e=>a(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,f=c("undefined"),h=u("ArrayBuffer"),p=c("string"),d=c("function"),y=c("number"),v=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=u("Date"),m=u("File"),w=u("Blob"),_=u("FileList"),O=u("URLSearchParams");function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,o=t.length;r0;)if(r=n[o],e===r.toLowerCase())return r;return null}const E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,C=t=>!f(t)&&t!==E,x=(R="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>R&&t instanceof R);var R;const j=u("HTMLFormElement"),T=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),k=u("RegExp"),A=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};S(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},N="abcdefghijklmnopqrstuvwxyz",F="0123456789",M={DIGIT:F,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+F},U=u("AsyncFunction");var q={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:b,isUndefined:f,isDate:g,isFile:m,isBlob:w,isRegExp:k,isFunction:d,isStream:t=>v(t)&&d(t.pipe),isURLSearchParams:O,isTypedArray:x,isFileList:_,forEach:S,merge:function t(){const{caseless:e}=C(this)&&this||{},n={},r=(r,o)=>{const i=e&&P(n,o)||o;b(n[i])&&b(r)?n[i]=t(n[i],r):b(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t(S(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)s=o[a],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:A,freezeMethods:t=>{A(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:P,global:E,isContextDefined:C,ALPHABET:M,generateString:(t=16,e=M.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=l(t)?[]:{};return S(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:U,isThenable:t=>t&&(v(t)||d(t))&&d(t.then)&&d(t.catch)};function H(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}q.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const L=H.prototype,I={};function D(t){return q.isPlainObject(t)||q.isArray(t)}function B(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function G(t,e,n){return t?t.concat(e).map((function(t,e){return t=B(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{I[t]={value:t}})),Object.defineProperties(H,I),Object.defineProperty(L,"isAxiosError",{value:!0}),H.from=(t,e,n,r,o,i)=>{const a=Object.create(L);return q.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),H.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const V=q.toFlatObject(q,{},null,(function(t){return/^is[A-Z]/.test(t)}));function W(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!q.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(q.isDate(t))return t.toISOString();if(!s&&q.isBlob(t))throw new H("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(t)||q.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,o){let s=t;if(t&&!o&&"object"==typeof t)if(q.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(q.isArray(t)&&function(t){return q.isArray(t)&&!t.some(D)}(t)||(q.isFileList(t)||q.endsWith(n,"[]"))&&(s=q.toArray(t)))return n=B(n),s.forEach((function(t,r){!q.isUndefined(t)&&null!==t&&e.append(!0===a?G([n],r,i):null===a?n:n+"[]",u(t))})),!1;return!!D(t)||(e.append(G(o,n,i),u(t)),!1)}const l=[],f=Object.assign(V,{defaultVisitor:c,convertValue:u,isVisitable:D});if(!q.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!q.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),q.forEach(n,(function(n,i){!0===(!(q.isUndefined(n)||null===n)&&o.call(e,n,q.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function K(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function z(t,e){this._pairs=[],t&&W(t,this,e)}const J=z.prototype;function Q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||Q,o=n&&n.serialize;let i;if(i=o?o(e,n):q.isURLSearchParams(e)?e.toString():new z(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}J.append=function(t,e){this._pairs.push([t,e])},J.toString=function(t){const e=t?function(e){return t.call(this,e,K)}:K;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var $=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const tt="undefined"!=typeof window&&"undefined"!=typeof document,et=(nt="undefined"!=typeof navigator&&navigator.product,tt&&["ReactNative","NativeScript","NS"].indexOf(nt)<0);var nt;const rt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ot={...Object.freeze({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:rt,hasStandardBrowserEnv:et}),...Z};function it(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&q.isArray(r)?r.length:i,s?(q.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&q.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&q.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r{e(function(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const at={transitional:Y,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return r?JSON.stringify(it(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return W(t,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return ot.isNode&&q.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return W(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(q.isString(t))try{return(0,JSON.parse)(t),q.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||at.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&q.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw H.from(t,H.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],(t=>{at.headers[t]={}}));var st=at;const ut=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ct=Symbol("internals");function lt(t){return t&&String(t).trim().toLowerCase()}function ft(t){return!1===t||null==t?t:q.isArray(t)?t.map(ft):String(t)}function ht(t,e,n,r,o){return q.isFunction(r)?r.call(this,e,n):(o&&(e=n),q.isString(e)?q.isString(r)?-1!==e.indexOf(r):q.isRegExp(r)?r.test(e):void 0:void 0)}class pt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=lt(e);if(!o)throw new Error("header name must be a non-empty string");const i=q.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=ft(t))}const i=(t,e)=>q.forEach(t,((t,n)=>o(t,n,e)));return q.isPlainObject(t)||t instanceof this.constructor?i(t,e):q.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&ut[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=lt(t)){const n=q.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(q.isFunction(e))return e.call(this,t,n);if(q.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=lt(t)){const n=q.findKey(this,t);return!(!n||void 0===this[n]||e&&!ht(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=lt(t)){const o=q.findKey(n,t);!o||e&&!ht(0,n[o],o,e)||(delete n[o],r=!0)}}return q.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!ht(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return q.forEach(this,((r,o)=>{const i=q.findKey(n,o);if(i)return e[i]=ft(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=ft(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return q.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&q.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ct]=this[ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=lt(t);e[r]||(function(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return q.isArray(t)?t.forEach(r):r(t),this}}pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(pt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),q.freezeMethods(pt);var dt=pt;function yt(t,e){const n=this||st,r=e||n,o=dt.from(r.headers);let i=r.data;return q.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function vt(t){return!(!t||!t.__CANCEL__)}function bt(t,e,n){H.call(this,null==t?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(bt,H,{__CANCEL__:!0});var gt=ot.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),q.isString(r)&&a.push("path="+r),q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var wt=ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=q.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function _t(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Ot={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=dt.from(t.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(q.isFormData(r))if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=mt(t.baseURL,t.url);function h(){if(!l)return;const r=dt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),c()}),(function(t){n(t),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new H("Request aborted",H.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new H("Network Error",H.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Y;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new H(e,r.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,l)),l=null},ot.hasStandardBrowserEnv&&(u&&q.isFunction(u)&&(u=u(t)),u||!1!==u&&wt(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&>.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&q.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),q.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",_t(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new bt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);p&&-1===ot.protocols.indexOf(p)?n(new H("Unsupported protocol "+p+":",H.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};q.forEach(Ot,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St=t=>`- ${t}`,Pt=t=>q.isFunction(t)||null===t||!1===t;var Et=t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new H("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(St).join("\n"):" "+St(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ct(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new bt(null,t)}function xt(t){return Ct(t),t.headers=dt.from(t.headers),t.data=yt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Et(t.adapter||st.adapter)(t).then((function(e){return Ct(t),e.data=yt.call(t,t.transformResponse,e),e.headers=dt.from(e.headers),e}),(function(e){return vt(e)||(Ct(t),e&&e.response&&(e.response.data=yt.call(t,t.transformResponse,e.response),e.response.headers=dt.from(e.response.headers))),Promise.reject(e)}))}const Rt=t=>t instanceof dt?{...t}:t;function jt(t,e){e=e||{};const n={};function r(t,e,n){return q.isPlainObject(t)&&q.isPlainObject(e)?q.merge.call({caseless:n},t,e):q.isPlainObject(e)?q.merge({},e):q.isArray(e)?e.slice():e}function o(t,e,n){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!q.isUndefined(e))return r(void 0,e)}function a(t,e){return q.isUndefined(e)?q.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=u[r]||o,a=i(t[r],e[r],r);q.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Tt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Tt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const kt={};Tt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new H(r(o," has been removed"+(e?" in "+e:"")),H.ERR_DEPRECATED);return e&&!kt[o]&&(kt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};var At={assertOptions:function(t,e,n){if("object"!=typeof t)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new H("option "+i+" must be "+n,H.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new H("Unknown option "+i,H.ERR_BAD_OPTION)}},validators:Tt};const Nt=At.validators;class Ft{constructor(t){this.defaults=t,this.interceptors={request:new $,response:new $}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&At.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),null!=r&&(q.isFunction(r)?e.paramsSerializer={serialize:r}:At.assertOptions(r,{encode:Nt.function,serialize:Nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&q.merge(o.common,o[e.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=dt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[xt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new bt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Ut((function(e){t=e})),cancel:t}}}var qt=Ut;const Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((([t,e])=>{Ht[e]=t}));var Lt=Ht;const It=function t(e){const n=new Mt(e),o=r(Mt.prototype.request,n);return q.extend(o,Mt.prototype,n,{allOwnKeys:!0}),q.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(jt(e,n))},o}(st);It.Axios=Mt,It.CanceledError=bt,It.CancelToken=qt,It.isCancel=vt,It.VERSION="1.6.8",It.toFormData=W,It.AxiosError=H,It.Cancel=It.CanceledError,It.all=function(t){return Promise.all(t)},It.spread=function(t){return function(e){return t.apply(null,e)}},It.isAxiosError=function(t){return q.isObject(t)&&!0===t.isAxiosError},It.mergeConfig=jt,It.AxiosHeaders=dt,It.formToJSON=t=>it(q.isHTMLForm(t)?new FormData(t):t),It.getAdapter=Et,It.HttpStatusCode=Lt,It.default=It,t.exports=It}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e){for(var n=0;nC});var c=n(4756),l=n.n(c),f=function(){return u((function t(){var e,n,r,i,a,s,u,c,l,f,h,p,d,y,v,b,g,m,w,_,O,S=this,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.server=P.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(e=this.server.cacheSearchResultsForSeconds)&&void 0!==e?e:120,this.additionalSearchParameters=null!==(n=P.additionalSearchParameters)&&void 0!==n?n:{},this.additionalSearchParameters.query_by=null!==(r=null!==(i=this.additionalSearchParameters.queryBy)&&void 0!==i?i:this.additionalSearchParameters.query_by)&&void 0!==r?r:"",this.additionalSearchParameters.preset=null!==(a=null!==(s=this.additionalSearchParameters.preset)&&void 0!==s?s:this.additionalSearchParameters.preset)&&void 0!==a?a:"",this.additionalSearchParameters.sort_by=null!==(u=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==u?u:"",this.additionalSearchParameters.highlight_full_fields=null!==(l=null!==(f=this.additionalSearchParameters.highlightFullFields)&&void 0!==f?f:this.additionalSearchParameters.highlight_full_fields)&&void 0!==l?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=P.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=P.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=P.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=S.collectionSpecificSearchParameters[t];s.query_by=null!==(e=s.queryBy)&&void 0!==e?e:s.query_by,s.preset=null!==(n=s.preset)&&void 0!==n?n:s.preset,s.sort_by=null!==(r=s.sortBy)&&void 0!==r?r:s.sort_by,s.highlight_full_fields=null!==(o=null!==(i=null!==(a=s.highlightFullFields)&&void 0!==a?a:s.highlight_full_fields)&&void 0!==i?i:S.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:s.query_by,Object.keys(s).forEach((function(t){return void 0===s[t]?delete s[t]:{}}))})),this.renderingContent=P.renderingContent,this.flattenGroupedHits=null===(y=P.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=P.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(b=P.filterByOptions)&&void 0!==b?b:{},this.sortByOptions=null!==(g=P.sortByOptions)&&void 0!==g?g:{},this.collectionSpecificFacetByOptions=null!==(m=P.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(w=P.collectionSpecificFilterByOptions)&&void 0!==w?w:{},this.collectionSpecificSortByOptions=null!==(_=P.collectionSpecificSortByOptions)&&void 0!==_?_:{},this.useExcludeForUnboundNumericRange=null!==(O=P.useExcludeForUnboundNumericRange)&&void 0!==O&&O}),[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(t){return t.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(t){return 0===(t.query_by||"").length&&0===(t.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])}(),h=n(8567);function p(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(r).join(",")));var o=Object.keys(r)[0],i=r[o].reduce((function(t,e){return e.startsWith("-")&&!n._isNumber(e)?t[0].push(e.substring(1)):t[1].push(e),t}),[[],[]]),a=v(i,2),s=a[0],u=a[1],c=[];if(u.length>0){var l=n._shouldUseExactMatchForField(o,e)?":=":":";c.push("".concat(o).concat(l,"[").concat(u.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}if(s.length>0){var f=n._shouldUseExactMatchForField(o,e)?":!=":":!";c.push("".concat(o).concat(f,"[").concat(s.map((function(t){return n._escapeFacetValue(t)})).join(","),"]"))}return c.filter((function(t){return t})).join(" && ")}var h,p=n._parseFacetFilter(t),d=p.fieldName,y=p.fieldValue;if(y.startsWith("-")&&!n._isNumber(y)){var b=n._shouldUseExactMatchForField(d,e)?":!=":":!";h="".concat(d).concat(b,"[").concat(n._escapeFacetValue(y.substring(1)),"]")}else{var g=n._shouldUseExactMatchForField(d,e)?":=":":";h="".concat(d).concat(g,"[").concat(n._escapeFacetValue(y),"]")}return h})).join(" && "):r}},{key:"_parseFacetFilter",value:function(t){var e,n,r,o,i;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(r=t.match(n)))return{fieldName:o="".concat(r[1]),fieldValue:i="".concat(r[2])}}return n=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(r[1]).concat(r[2]),i="".concat(r[3])),{fieldName:o,fieldValue:i}}},{key:"_escapeFacetValue",value:function(t){return"boolean"==typeof t||"true"===t||"false"===t||this._isNumber(t)?t:"`".concat(t,"`")}},{key:"_isNumber",value:function(t){return Number.isInteger(t%1)||!!(t%1)}},{key:"_adaptNumericFilters",value:function(t){var e=this,n="";if(!t)return n;var r={};t.forEach((function(t){var n=e._parseNumericFilter(t),o=n.fieldName,i=n.operator,a=n.fieldValue;r[o]=r[o]||{},r[o][i]=a}));var o=[];return Object.keys(r).forEach((function(t){null!=r[t]["<="]&&null!=r[t][">="]?e.configuration.useExcludeForUnboundNumericRange&&parseInt(r[t][">="])>parseInt(r[t]["<="])?o.push("".concat(t,":!=[").concat(r[t]["<="],"..").concat(r[t][">="],"]")):o.push("".concat(t,":=[").concat(r[t][">="],"..").concat(r[t]["<="],"]")):null!=r[t]["<="]?o.push("".concat(t,":<=").concat(r[t]["<="])):null!=r[t][">="]?o.push("".concat(t,":>=").concat(r[t][">="])):null!=r[t]["="]?o.push("".concat(t,":=").concat(r[t]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(r[t])))})),o.join(" && ")}},{key:"_parseNumericFilter",value:function(t){var e,n,r,o,i,a;if((null===(e=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===e?void 0:e.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.map((function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(r=t.match(n))){var u=v(r,4);return{fieldName:o=u[1],operator:i=u[2],fieldValue:a=u[3]}}}if(n=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(r=t.match(n)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(t,"` with the Regex `").concat(n,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var c=v(r,4);o=c[1],i=c[2],a=c[3]}return{fieldName:o,operator:i,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(t){var e=t.insideBoundingBox,n=t.aroundRadius,r=t.aroundLatLng,o=t.insidePolygon;if(e){var i,a,s,u;if(Array.isArray(e)){var c=v(e.flat(),4);i=c[0],a=c[1],s=c[2],u=c[3]}else{var l=v(e.split(","),4);i=l[0],a=l[1],s=l[2],u=l[3]}return"".concat(this.configuration.geoLocationField,":(").concat(i,", ").concat(a,", ").concat(i,", ").concat(u,", ").concat(s,", ").concat(u,", ").concat(s,", ").concat(a,")")}if(r||n){if(!n||"all"===n)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var f="".concat(parseFloat(n)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(r,", ").concat(f,")")}if(o){var h=o;return Array.isArray(o)&&(h=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(h,")")}}},{key:"_adaptFilters",value:function(t,e){var n=[];return t.filters&&n.push(t.filters),n.push(this._adaptFacetFilters(t.facetFilters,e)),n.push(this._adaptNumericFilters(t.numericFilters)),n.push(this._adaptGeoFilter(t)),n.filter((function(t){return t&&""!==t})).join(" && ")}},{key:"_adaptIndexName",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(t){return t.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(t,e){var n=this;return[t].flat().map((function(t){var r;return null!==(r=n.configuration.collectionSpecificFacetByOptions)&&void 0!==r&&null!==(r=r[e])&&void 0!==r&&r[t]?"".concat(t).concat(n.configuration.collectionSpecificFacetByOptions[e][t]):n.configuration.facetByOptions[t]?"".concat(t).concat(n.configuration.facetByOptions[t]):t})).join(",")}},{key:"_buildSearchParameters",value:function(t){for(var e,n,r=t.params,o=t.indexName,i=this._adaptIndexName(o),a={},s=0,u=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]);var t}();function m(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _={_adaptHighlightTag:function(t,e,n){return t.replace(new RegExp("","g"),e||"").replace(new RegExp("","g"),n||"")},_adaptNumberOfPages:function(){var t=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(t)?Math.ceil(t):1}};function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n,this.configuration=r,this.allTypesenseResults=i,this.fullTypesenseResponse=a}),[{key:"_adaptGroupedHits",value:function(t){var e=this,n=[];return n=t.map((function(t){var n=e._adaptHits(t.hits);return n.forEach((function(e){e.group_key=e._group_key=t.group_key,t.found&&(e._group_found=t.found)})),n})),this.configuration.flattenGroupedHits?n.flat():n.map((function(t){return S(S({},t[0]),{},{_grouped_hits:t})}))}},{key:"_adaptHits",value:function(t){var e=this;return t.map((function(t){var n=S({},t.document);n.objectID=t.document.id,n._snippetResult=e._adaptHighlightResult(t,"snippet"),n._highlightResult=e._adaptHighlightResult(t,"value"),n._rawTypesenseHit=t,e.fullTypesenseResponse.conversation&&(n._rawTypesenseConversation=e.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(e){Object.keys(t).includes(e)&&!Object.keys(n).includes(e)&&(n[e]=t[e])}));var r=n[e.configuration.geoLocationField];return r&&(n._geoloc={lat:r[0],lng:r[1]}),n}))}},{key:"_adaptHighlightResult",value:function(t,e){var n={};return null!=t.highlight&&this.isHighlightPost0240RCN32Format(t.highlight)?this.adaptHighlightObject(t,n,e):this.adaptHighlightsArray(t,n,e),n}},{key:"isHighlightPost0240RCN32Format",value:function(t){return null==t.full&&null==t.snippet}},{key:"adaptHighlightsArray",value:function(t,e,n){var r=this;Object.assign.apply(Object,[e].concat(m(Object.entries(t.document).map((function(t){var e=v(t,2);return w({},e[0],{value:e[1],matchLevel:"none",matchedWords:[]})}))))),t.highlights.forEach((function(t){e[t.field]={value:t[n]||t["".concat(n,"s")],matchLevel:"full",matchedWords:t.matched_tokens},t.indices&&(e[t.field].matchedIndices=t.indices)})),Object.entries(e).forEach((function(o){var a=v(o,2),s=a[0],u=a[1],c=s,l=u.value,f=u.matchLevel,h=u.matchedWords,p=u.matchedIndices;null==l?e[c]=r._adaptHighlightNullValue():Array.isArray(l)?(e[c]=[],t.document[c].forEach((function(t,o){p&&p.includes(o)?e[c].push({value:r._adaptHighlightTag("".concat(l[p.indexOf(o)]),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag),matchLevel:f,matchedWords:h[o]}):"object"===i(t)?e[c].push(r._adaptHighlightInObjectValue(t,{},n)):e[c].push({value:"".concat(t),matchLevel:"none",matchedWords:[]})}))):"object"===i(l)?e[c]=r._adaptHighlightInObjectValue(l,{},n):e[c].value=r._adaptHighlightTag("".concat(l),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(t,e,n){Object.assign(e,this._adaptHighlightInObjectValue(t.document,t.highlight,n))}},{key:"_adaptHighlightInObjectValue",value:function(t,e,n){var r=this;return Object.assign.apply(Object,[{}].concat(m(Object.entries(t).map((function(t){var o,a=v(t,2),s=a[0],u=a[1];if(null==u)o=r._adaptHighlightNullValue();else if(Array.isArray(u)){var c;o=r._adaptHighlightInArrayValue(u,null!==(c=null==e?void 0:e[s])&&void 0!==c?c:[],n)}else if("object"===i(u)){var l;o=r._adaptHighlightInObjectValue(u,null!==(l=null==e?void 0:e[s])&&void 0!==l?l:{},n)}else o=r._adaptHighlightInPrimitiveValue(u,null==e?void 0:e[s],n);return w({},s,o)})))))}},{key:"_adaptHighlightInArrayValue",value:function(t,e,n){var r=this;return t.map((function(t,o){var a;if(null==t)a=r._adaptHighlightNullValue();else if(Array.isArray(t)){var s;a=r._adaptHighlightInArrayValue(t,null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],n)}else if("object"===i(t)){var u;a=r._adaptHighlightInObjectValue(t,null!==(u=null==e?void 0:e[o])&&void 0!==u?u:{},n)}else a=r._adaptHighlightInPrimitiveValue(t,null==e?void 0:e[o],n);return a}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(t,e,n){var r,o;return null!=e?{value:this._adaptHighlightTag("".concat(null!==(r=null!==(o=e[n])&&void 0!==o?o:e.highlight)&&void 0!==r?r:e.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(e.matched_tokens||[]).length>0?"full":"none",matchedWords:e.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(t),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(t){var e={};return t.forEach((function(t){Object.assign(e,w({},t.field_name,Object.assign.apply(Object,[{}].concat(m(t.counts.map((function(t){return w({},t.value,t.count)})))))))})),e}},{key:"_adaptFacetStats",value:function(t){var e={};return t.forEach((function(t){Object.keys(t.stats).length>0&&Object.assign(e,w({},t.field_name,t.stats))})),e}},{key:"_adaptRenderingContent",value:function(t){var e,n=Object.assign({},this.configuration.renderingContent);return null==(null===(e=n.facetOrdering)||void 0===e||null===(e=e.facets)||void 0===e?void 0:e.order)&&(n.facetOrdering=n.facetOrdering||{},n.facetOrdering.facets=n.facetOrdering.facets||{},n.facetOrdering.facets.order=m(new Set(t.map((function(t){return t.field_name})).concat(this.allTypesenseResults.map((function(t){return t.facet_counts||[]})).flat().map((function(t){return t.field_name})).filter((function(t){return t})))))),n}},{key:"adapt",value:function(){var t=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),e=S({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(t).length>0?{renderingContent:t}:null);return this.fullTypesenseResponse.conversation&&0===e.hits.length&&(e.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),e}}])}();Object.assign(P.prototype,_);var E=function(){return u((function t(e,n){o(this,t),this.typesenseResponse=e,this.instantsearchRequest=n}),[{key:"_adaptFacetHits",value:function(t){var e=this;return t.find((function(t){return t.field_name===e.instantsearchRequest.params.facetName})).counts.map((function(t){return{value:t.value,highlighted:e._adaptHighlightTag(t.highlighted,e.instantsearchRequest.params.highlightPreTag,e.instantsearchRequest.params.highlightPostTag),count:t.count}}))}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])}();Object.assign(E.prototype,_);var C=function(){return u((function t(e){var n=this;o(this,t),this.updateConfiguration(e),this.searchClient={clearCache:function(){return n.clearCache()},search:function(t){return n.searchTypesenseAndAdapt(t)},searchForFacetValues:function(t){return n.searchTypesenseForFacetValuesAndAdapt(t)}}}),[{key:"searchTypesenseAndAdapt",value:(r=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,r){return o._validateTypesenseResult(t),new P(t,e[r],o.configuration,n.results,n).adapt()})),t.abrupt("return",{results:r});case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return r.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(n=e(l().mark((function t(e){var n,r,o=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._adaptAndPerformTypesenseRequest(e);case 3:return n=t.sent,r=n.results.map((function(t,n){return o._validateTypesenseResult(t),new E(t,e[n],o.configuration).adapt()})),t.abrupt("return",r);case 8:throw t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return n.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(t=e(l().mark((function t(e){var n,r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new g(e,this.typesenseClient,this.configuration),t.next=3,n.request();case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new h.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(t){return this.configuration=new f(t),this.configuration.validate(),this.typesenseClient=new h.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(t){if(t.error)throw new Error("".concat(t.code," - ").concat(t.error));if(!t.hits&&!t.grouped_hits)throw new Error("Did not find any hits. ".concat(t.code," - ").concat(t.error))}}]);var t,n,r}()})(),r.default})())); //# sourceMappingURL=typesense-instantsearch-adapter.min.js.map \ No newline at end of file diff --git a/dist/typesense-instantsearch-adapter.min.js.map b/dist/typesense-instantsearch-adapter.min.js.map index 5f6419f..e9eb543 100644 --- a/dist/typesense-instantsearch-adapter.min.js.map +++ b/dist/typesense-instantsearch-adapter.min.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense-instantsearch-adapter.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuC,8BAAID,IAE3CD,EAAoC,8BAAIC,GACzC,CATD,CASGK,MAAM,sCCTT,SAMC,SAAUN,EAAMO,GACb,aAEI,EAMA,WAIJ,IAAIC,EAAO,WAAY,EACnBC,EAAgB,YAChBC,SAAeC,SAAWF,UAA0BE,OAAOC,YAAcH,GACzE,kBAAkBI,KAAKF,OAAOC,UAAUE,WAGxCC,EAAa,CACb,QACA,QACA,OACA,OACA,SAIJ,SAASC,EAAWC,EAAKC,GACrB,IAAIC,EAASF,EAAIC,GACjB,GAA2B,mBAAhBC,EAAOC,KACd,OAAOD,EAAOC,KAAKH,GAEnB,IACI,OAAOI,SAASC,UAAUF,KAAKG,KAAKJ,EAAQF,EAChD,CAAE,MAAOO,GAEL,OAAO,WACH,OAAOH,SAASC,UA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J,EAAAp2C,MAAA,KAAAC,UAAA,KAAA8V,IAAA,aAAAnR,MAED,WAEE,OADAjE,KAAK6mC,gBAAkB,IAAIiP,EAAAA,aAAsB91C,KAAK2I,cAAcw7B,QAC7DnkC,KAAKw0C,YACd,GAAC,CAAAp/B,IAAA,sBAAAnR,MAED,SAAoBgN,GAIlB,OAHAjR,KAAK2I,cAAgB,IAAI0L,EAAcpD,GACvCjR,KAAK2I,cAAc2C,WACnBtL,KAAK6mC,gBAAkB,IAAIiP,EAAAA,aAAsB91C,KAAK2I,cAAcw7B,SAC7D,CACT,GAAC,CAAA/uB,IAAA,2BAAAnR,MAED,SAAyB+wC,GACvB,GAAIA,EAAgB3lC,MAClB,MAAM,IAAIjD,MAAM,GAADhF,OAAI4tC,EAAgBhnC,KAAI,OAAA5G,OAAM4tC,EAAgB3lC,QAE/D,IAAK2lC,EAAgB5F,OAAS4F,EAAgB1B,aAC5C,MAAM,IAAIlnC,MAAM,0BAADhF,OAA2B4tC,EAAgBhnC,KAAI,OAAA5G,OAAM4tC,EAAgB3lC,OAExF,KA3BC,IAAAomC,EAtBAJ,EA5BAT,CA6EA,CAtF+C","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false;\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][\">=\"] > filtersHash[field][\"<=\"]) {\n //exclude unbound range:\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","definition","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","log","trace","replaceLoggingMethods","level","loggerName","i","length","this","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","undefined","realMethod","Logger","name","defaultLevel","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","cookie","document","location","indexOf","encodeURIComponent","exec","slice","levels","getLevel","setLevel","persist","toUpperCase","SILENT","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","TypeError","logger","_log","noConflict","getLoggers","__createBinding","Object","create","o","m","k","k2","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","hasOwnProperty","__importDefault","Errors","SearchClient","Client","Client_1","default","SearchClient_1","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","done","then","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","op","pop","push","Aliases_1","Alias","apiCall","retrieve","_a","endpointPath","delete","concat","RESOURCEPATH","Aliases","upsert","mapping","put","aliasName","AnalyticsRules_1","AnalyticsRule_1","Analytics","individualAnalyticsRules","_analyticsRules","rules","id","AnalyticsRule","AnalyticsRules","params","operation","axios_1","Errors_1","TypesenseError_1","HEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_b","_c","abortSignal","_d","responseType","_e","performRequest","post","bodyParameters","patch","requestType","_f","_g","_h","_j","_k","skipConnectionTimeout","requestNumber","lastException","_loop_1","this_1","numTries","state_1","_l","validate","Date","now","node","abortListener","requestOptions","cancelToken","source_1","response","error_1","_m","getNextNode","index","aborted","Error","url","uriFor","headers","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","httpsAgent","CancelToken","source","cancel","addEventListener","token","setNodeHealthcheck","customErrorForResponse","message","warn","code","timer","removeEventListener","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_this","forEach","protocol","host","port","path","seconds","setTimeout","messageFromServer","errorMessage","trim","error","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","httpStatus","Configuration_1","ApiCall_1","Collections_1","Collection_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","Stopwords_1","Stopword_1","Conversations_1","Conversation_1","options","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","collections","collectionName","aliases","presets","stopwords","conversations","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","update","schema","exists","e_1","documents","documentId","Document","overrides","overrideId","synonyms","synonymId","Collections","__assign","s","p","Configuration","setDefaultPathInNode","setDefaultPortInNode","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","MissingConfigurationError","isNodeMissingAnyParameters","some","every","key","masterNode","readReplicaNodes","array","j","Math","floor","random","Conversation","ConversationModels_1","ConversationModel","ConversationModels","ConversationModel_1","Conversations","individualConversationModels","_conversationsModels","models","Debug","partialDocument","extendStatics","__extends","d","b","setPrototypeOf","__proto__","Array","String","__","constructor","Documents","_super","action","query","createMany","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","isArray","RangeError","includes","split","r","filter","success","ImportError","export","exportStream","SearchOnlyDocuments","importResults","TypesenseError","_newTarget","HTTPError_1","MissingConfigurationError_1","ObjectAlreadyExists_1","ObjectNotFound_1","ObjectUnprocessable_1","RequestMalformed_1","RequestUnauthorized_1","ServerError_1","ImportError_1","Health","Key","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","createHmac","keyPrefix","substr","rawScopedKey","toString","Metrics","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","clearCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","cacheResponseForSeconds","Operations","operationName","Override","Overrides","Preset","presetId","Presets","__spreadArray","to","pack","ar","l","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","requestTimestamp","set","size","SearchOnlyCollection_1","entries","SearchOnlyCollection","SearchOnlyDocuments_1","search","searchParameters","Stopword","stopwordId","Stopwords","Synonym","Synonyms","_typeof","_regeneratorRuntime","a","c","asyncIterator","u","toStringTag","wrap","Generator","Context","makeInvokeMethod","tryCatch","type","arg","h","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","values","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","async","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","fn","kindOf","cache","thing","str","toLowerCase","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","utils$1","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","position","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","p1","p2","toFiniteNumber","defaultValue","Number","isFinite","global","generateString","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","target","reducedValue","isThenable","catch","AxiosError","config","request","captureStackTrace","toJSON","description","number","fileName","lineNumber","columnNumber","prototype$1","isVisitable","removeBrackets","renderKey","dots","customProps","axiosError","cause","predicates","toFormData","formData","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","isFlatArray","el","exposedHelpers","build","encode$1","charMap","match","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","synchronous","runWhen","eject","clear","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","freeze","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","defaults","transitional","adapter","transformRequest","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","stringifySafely","JSONRequested","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","common","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","tokens","tokensRE","parseTokens","has","matcher","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","first","computed","accessor","accessors","defineAccessor","accessorName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","write","expires","domain","secure","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","hash","hostname","pathname","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","unsubscribe","signal","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","abort","subscribe","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","validators$1","deprecatedWarnings","validator","version","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$1","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","args","_classCallCheck","Constructor","toPropertyKey","toPrimitive","_defineProperties","_createClass","protoProps","staticProps","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","_options$useExcludeFo","server","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","useExcludeForUnboundNumericRange","_objectWithoutProperties","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_slicedToArray","_excluded","SearchRequestAdapter","instantsearchRequests","typesenseClient","fieldName","_this$configuration$c","_this$configuration$f","exactMatch","facetFilters","adaptedResult","item","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","_fieldValues$reduce","reduce","_isNumber","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","_shouldUseExactMatchForField","_escapeFacetValue","typesenseFilterString","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","isInteger","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches4","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl2","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","instantsearchParams","filters","_adaptFacetFilters","_adaptNumericFilters","_adaptGeoFilter","indexName","INDEX_NAME_MATCHING_REGEX","facets","_this3","facet","_this3$configuration$","instantsearchRequest","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","_adaptIndexName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","_adaptSortBy","q","facet_by","_adaptFacetBy","filter_by","_adaptFilters","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_callee","_searches$","_searches$2","searches","_searches$3","conversation","conversation_id","conversation_model_id","_this4","_context","_buildSearchParameters","searchParams","_toConsumableArray","iter","_defineProperty","utils","_adaptHighlightTag","highlightPreTag","highlightPostTag","_adaptNumberOfPages","typesenseResponse","found","request_params","ceil","ownKeys","_objectSpread","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","objectID","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","matchLevel","matchedWords","highlights","matched_tokens","indices","attribute","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","adaptedValue","_ref7","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","typesenseFacetCounts","field_name","counts","count","stats","_adaptedResult$facetO","facetOrdering","order","Set","fc","facet_counts","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","FacetSearchResponseAdapter","find","facetCount","highlighted","facetHits","_adaptFacetHits","exhaustiveFacetsCount","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","results","typesenseResult","_validateTypesenseResult","adapt","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_context3","_x3","TypesenseSearchClient"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense-instantsearch-adapter.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuC,8BAAID,IAE3CD,EAAoC,8BAAIC,GACzC,CATD,CASGK,MAAM,sCCTT,SAMC,SAAUN,EAAMO,GACb,aAEI,EAMA,WAIJ,IAAIC,EAAO,WAAY,EACnBC,EAAgB,YAChBC,SAAeC,SAAWF,UAA0BE,OAAOC,YAAcH,GACzE,kBAAkBI,KAAKF,OAAOC,UAAUE,WAGxCC,EAAa,CACb,QACA,QACA,OACA,OACA,SAIJ,SAASC,EAAWC,EAAKC,GACrB,IAAIC,EAASF,EAAIC,GACjB,GAA2B,mBAAhBC,EAAOC,KACd,OAAOD,EAAOC,KAAKH,GAEnB,IACI,OAAOI,SAASC,UAAUF,KAAKG,KAAKJ,EAAQF,EAChD,CAAE,MAAOO,GAEL,OAAO,WACH,OAAOH,SAASC,UAAUG,MAAMA,MAAMN,EAAQ,CAACF,EAAKS,WACxD,CACJ,CAER,CAGA,SAASC,IACDC,QAAQC,MACJD,QAAQC,IAAIJ,MACZG,QAAQC,IAAIJ,MAAMG,QAASF,WAG3BL,SAASC,UAAUG,MAAMA,MAAMG,QAAQC,IAAK,CAACD,QAASF,aAG1DE,QAAQE,OAAOF,QAAQE,OAC/B,CAwBA,SAASC,EAAsBC,EAAOC,GAElC,IAAK,IAAIC,EAAI,EAAGA,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jR,KAAK2I,cAAc2C,WACnBtL,KAAK6mC,gBAAkB,IAAIkP,EAAAA,aAAsB/1C,KAAK2I,cAAcw7B,SAC7D,CACT,GAAC,CAAA/uB,IAAA,2BAAAnR,MAED,SAAyBgxC,GACvB,GAAIA,EAAgB5lC,MAClB,MAAM,IAAIjD,MAAM,GAADhF,OAAI6tC,EAAgBjnC,KAAI,OAAA5G,OAAM6tC,EAAgB5lC,QAE/D,IAAK4lC,EAAgB5F,OAAS4F,EAAgB1B,aAC5C,MAAM,IAAInnC,MAAM,0BAADhF,OAA2B6tC,EAAgBjnC,KAAI,OAAA5G,OAAM6tC,EAAgB5lC,OAExF,KA3BC,IAAAqmC,EAtBAJ,EA5BAT,CA6EA,CAtF+C","sources":["webpack://TypesenseInstantSearchAdapter/webpack/universalModuleDefinition","webpack://TypesenseInstantSearchAdapter/./node_modules/loglevel/lib/loglevel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Alias.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Aliases.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Analytics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRule.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/AnalyticsRules.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ApiCall.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Client.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Collections.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversation.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModel.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/ConversationModels.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Conversations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Debug.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Document.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Documents.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/HTTPError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ImportError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/ServerError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Errors/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Health.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Key.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Keys.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Metrics.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/MultiSearch.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Operations.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Override.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Overrides.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Preset.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Presets.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/RequestWithCache.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchClient.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopword.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Stopwords.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonym.js","webpack://TypesenseInstantSearchAdapter/./node_modules/typesense/lib/Typesense/Synonyms.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/regenerator/index.js","webpack://TypesenseInstantSearchAdapter/./node_modules/axios/dist/browser/axios.cjs","webpack://TypesenseInstantSearchAdapter/webpack/bootstrap","webpack://TypesenseInstantSearchAdapter/webpack/runtime/compat get default export","webpack://TypesenseInstantSearchAdapter/webpack/runtime/define property getters","webpack://TypesenseInstantSearchAdapter/webpack/runtime/global","webpack://TypesenseInstantSearchAdapter/webpack/runtime/hasOwnProperty shorthand","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://TypesenseInstantSearchAdapter/./src/Configuration.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://TypesenseInstantSearchAdapter/./src/SearchRequestAdapter.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://TypesenseInstantSearchAdapter/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://TypesenseInstantSearchAdapter/./src/support/utils.js","webpack://TypesenseInstantSearchAdapter/./src/SearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/FacetSearchResponseAdapter.js","webpack://TypesenseInstantSearchAdapter/./src/TypesenseInstantsearchAdapter.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TypesenseInstantSearchAdapter\"] = factory();\n\telse\n\t\troot[\"TypesenseInstantSearchAdapter\"] = factory();\n})(self, () => {\nreturn ","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar Client_1 = __importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = __importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = __importStar(require(\"./Typesense/Errors\"));\nexports.Errors = Errors;\nexports.default = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors };\n//# sourceMappingURL=Typesense.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias = /** @class */ (function () {\n function Alias(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n Alias.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Alias.prototype.endpointPath = function () {\n return \"\".concat(Aliases_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/aliases\";\nvar Aliases = /** @class */ (function () {\n function Aliases(apiCall) {\n this.apiCall = apiCall;\n }\n Aliases.prototype.upsert = function (name, mapping) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)];\n });\n });\n };\n Aliases.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Aliases.prototype.endpointPath = function (aliasName) {\n return \"\".concat(Aliases.RESOURCEPATH, \"/\").concat(aliasName);\n };\n Object.defineProperty(Aliases, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Aliases;\n}());\nexports.default = Aliases;\n//# sourceMappingURL=Aliases.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = __importDefault(require(\"./AnalyticsRule\"));\nvar RESOURCEPATH = \"/analytics\";\nvar Analytics = /** @class */ (function () {\n function Analytics(apiCall) {\n this.apiCall = apiCall;\n this.individualAnalyticsRules = {};\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules_1.default(this.apiCall);\n }\n Analytics.prototype.rules = function (id) {\n if (id === undefined) {\n return this._analyticsRules;\n }\n else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule_1.default(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n };\n Object.defineProperty(Analytics, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Analytics;\n}());\nexports.default = Analytics;\n//# sourceMappingURL=Analytics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar AnalyticsRules_1 = __importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule = /** @class */ (function () {\n function AnalyticsRule(name, apiCall) {\n this.name = name;\n this.apiCall = apiCall;\n }\n AnalyticsRule.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.endpointPath = function () {\n return \"\".concat(AnalyticsRules_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/analytics/rules\";\nvar AnalyticsRules = /** @class */ (function () {\n function AnalyticsRules(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsRules.prototype.upsert = function (name, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)];\n });\n });\n };\n AnalyticsRules.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRules.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(AnalyticsRules, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsRules;\n}());\nexports.default = AnalyticsRules;\n//# sourceMappingURL=AnalyticsRules.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar axios_1 = __importDefault(require(\"axios\"));\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = __importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar ApiCall = /** @class */ (function () {\n function ApiCall(configuration) {\n this.configuration = configuration;\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n this.logger = this.configuration.logger;\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n ApiCall.prototype.get = function (endpoint, queryParameters, _a) {\n if (queryParameters === void 0) { queryParameters = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_e) {\n return [2 /*return*/, this.performRequest(\"get\", endpoint, {\n queryParameters: queryParameters,\n abortSignal: abortSignal,\n responseType: responseType,\n })];\n });\n });\n };\n ApiCall.prototype.delete = function (endpoint, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"delete\", endpoint, { queryParameters: queryParameters })];\n });\n });\n };\n ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n if (additionalHeaders === void 0) { additionalHeaders = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"post\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n additionalHeaders: additionalHeaders,\n })];\n });\n });\n };\n ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"put\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) {\n if (bodyParameters === void 0) { bodyParameters = {}; }\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.performRequest(\"patch\", endpoint, {\n queryParameters: queryParameters,\n bodyParameters: bodyParameters,\n })];\n });\n });\n };\n ApiCall.prototype.performRequest = function (requestType, endpoint, _a) {\n var _b, _c, _d;\n var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k;\n return __awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, _loop_1, this_1, numTries, state_1;\n return __generator(this, function (_l) {\n switch (_l.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n this.logger.debug(\"Request #\".concat(requestNumber, \": Performing \").concat(requestType.toUpperCase(), \" request: \").concat(endpoint));\n _loop_1 = function (numTries) {\n var node, abortListener, requestOptions, cancelToken, source_1, response, error_1;\n return __generator(this, function (_m) {\n switch (_m.label) {\n case 0:\n node = this_1.getNextNode(requestNumber);\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Attempting \").concat(requestType.toUpperCase(), \" request Try #\").concat(numTries, \" to Node \").concat(node.index));\n if (abortSignal && abortSignal.aborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n abortListener = void 0;\n _m.label = 1;\n case 1:\n _m.trys.push([1, 3, 5, 6]);\n requestOptions = {\n method: requestType,\n url: this_1.uriFor(endpoint, node),\n headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType: responseType,\n validateStatus: function (status) {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n function (data, headers) {\n var transformedData = data;\n if (headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000;\n }\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n if (this_1.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this_1.apiKey;\n }\n if (this_1.configuration.httpAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpAgent\"));\n requestOptions.httpAgent = this_1.configuration.httpAgent;\n }\n if (this_1.configuration.httpsAgent) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom httpsAgent\"));\n requestOptions.httpsAgent = this_1.configuration.httpsAgent;\n }\n if (bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))) {\n requestOptions.data = bodyParameters;\n }\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n cancelToken = axios_1.default.CancelToken;\n source_1 = cancelToken.source();\n abortListener = function () { return source_1.cancel(); };\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source_1.token;\n }\n return [4 /*yield*/, (0, axios_1.default)(requestOptions)];\n case 2:\n response = _m.sent();\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this_1.setNodeHealthcheck(node, HEALTHY);\n }\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" was made. Response Code was \").concat(response.status, \".\"));\n if (response.status >= 200 && response.status < 300) {\n return [2 /*return*/, { value: Promise.resolve(response.data) }];\n }\n else if (response.status < 500) {\n return [2 /*return*/, { value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) }];\n }\n else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message);\n }\n return [3 /*break*/, 6];\n case 3:\n error_1 = _m.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat(error_1.code, \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _m.sent();\n return [3 /*break*/, 6];\n case 5:\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n return [7 /*endfinally*/];\n case 6: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n numTries = 1;\n _l.label = 1;\n case 1:\n if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4];\n return [5 /*yield**/, _loop_1(numTries)];\n case 2:\n state_1 = _l.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _l.label = 3;\n case 3:\n numTries++;\n return [3 /*break*/, 1];\n case 4:\n this.logger.debug(\"Request #\".concat(requestNumber, \": No retries left. Raising last error\"));\n return [2 /*return*/, Promise.reject(lastException)];\n }\n });\n });\n };\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n ApiCall.prototype.getNextNode = function (requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: Node \").concat(this.nearestNode.index, \" is \").concat(this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"));\n if (this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(this.nearestNode.index));\n return this.nearestNode;\n }\n this.logger.debug(\"Request #\".concat(requestNumber, \": Falling back to individual nodes\"));\n }\n // Fallback to nodes as usual\n this.logger.debug(\"Request #\".concat(requestNumber, \": Nodes Health: \").concat(this.nodes\n .map(function (node) {\n return \"Node \".concat(node.index, \" is \").concat(node.isHealthy === true ? \"Healthy\" : \"Unhealthy\");\n })\n .join(\" || \")));\n var candidateNode = this.nodes[0];\n for (var i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Updated current node to Node \").concat(candidateNode.index));\n return candidateNode;\n }\n }\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\"Request #\".concat(requestNumber, \": No healthy nodes were found. Returning the next node, Node \").concat(candidateNode.index));\n return candidateNode;\n };\n ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) {\n if (requestNumber === void 0) { requestNumber = 0; }\n var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\"Request #\".concat(requestNumber, \": Node \").concat(node.index, \" has exceeded healtcheckIntervalSeconds of \").concat(this.healthcheckIntervalSeconds, \". Adding it back into rotation.\"));\n }\n return isDueForHealthcheck;\n };\n ApiCall.prototype.initializeMetadataForNodes = function () {\n var _this = this;\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n this.nodes.forEach(function (node, i) {\n node.index = i;\n _this.setNodeHealthcheck(node, HEALTHY);\n });\n };\n ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n };\n ApiCall.prototype.uriFor = function (endpoint, node) {\n if (node.url != null) {\n return \"\".concat(node.url).concat(endpoint);\n }\n return \"\".concat(node.protocol, \"://\").concat(node.host, \":\").concat(node.port).concat(node.path).concat(endpoint);\n };\n ApiCall.prototype.defaultHeaders = function () {\n var defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n };\n ApiCall.prototype.timer = function (seconds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })];\n });\n });\n };\n ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) {\n var errorMessage = \"Request failed with HTTP code \".concat(response.status);\n if (typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\") {\n errorMessage += \" | Server said: \".concat(messageFromServer);\n }\n var error = new TypesenseError_1.default(errorMessage);\n if (response.status === 400) {\n error = new Errors_1.RequestMalformed(errorMessage);\n }\n else if (response.status === 401) {\n error = new Errors_1.RequestUnauthorized(errorMessage);\n }\n else if (response.status === 404) {\n error = new Errors_1.ObjectNotFound(errorMessage);\n }\n else if (response.status === 409) {\n error = new Errors_1.ObjectAlreadyExists(errorMessage);\n }\n else if (response.status === 422) {\n error = new Errors_1.ObjectUnprocessable(errorMessage);\n }\n else if (response.status >= 500 && response.status <= 599) {\n error = new Errors_1.ServerError(errorMessage);\n }\n else {\n error = new Errors_1.HTTPError(errorMessage);\n }\n error.httpStatus = response.status;\n return error;\n };\n return ApiCall;\n}());\nexports.default = ApiCall;\n//# sourceMappingURL=ApiCall.js.map","\"use strict\";\n/* eslint-disable no-dupe-class-members */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Collection_1 = __importDefault(require(\"./Collection\"));\nvar Aliases_1 = __importDefault(require(\"./Aliases\"));\nvar Alias_1 = __importDefault(require(\"./Alias\"));\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key_1 = __importDefault(require(\"./Key\"));\nvar Debug_1 = __importDefault(require(\"./Debug\"));\nvar Metrics_1 = __importDefault(require(\"./Metrics\"));\nvar Health_1 = __importDefault(require(\"./Health\"));\nvar Operations_1 = __importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset_1 = __importDefault(require(\"./Preset\"));\nvar Analytics_1 = __importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = __importDefault(require(\"./Stopword\"));\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation_1 = __importDefault(require(\"./Conversation\"));\nvar Client = /** @class */ (function () {\n function Client(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false;\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.debug = new Debug_1.default(this.apiCall);\n this.metrics = new Metrics_1.default(this.apiCall);\n this.health = new Health_1.default(this.apiCall);\n this.operations = new Operations_1.default(this.apiCall);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration);\n this._collections = new Collections_1.default(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases_1.default(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys_1.default(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets_1.default(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords_1.default(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics_1.default(this.apiCall);\n this._conversations = new Conversations_1.default(this.apiCall);\n this.individualConversations = {};\n }\n Client.prototype.collections = function (collectionName) {\n if (collectionName === undefined) {\n return this._collections;\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection_1.default(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n Client.prototype.aliases = function (aliasName) {\n if (aliasName === undefined) {\n return this._aliases;\n }\n else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias_1.default(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n };\n Client.prototype.keys = function (id) {\n if (id === undefined) {\n return this._keys;\n }\n else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key_1.default(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n };\n Client.prototype.presets = function (id) {\n if (id === undefined) {\n return this._presets;\n }\n else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset_1.default(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n };\n Client.prototype.stopwords = function (id) {\n if (id === undefined) {\n return this._stopwords;\n }\n else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword_1.default(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n };\n Client.prototype.conversations = function (id) {\n if (id === undefined) {\n return this._conversations;\n }\n else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation_1.default(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n };\n return Client;\n}());\nexports.default = Client;\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override_1 = __importDefault(require(\"./Override\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = __importDefault(require(\"./Synonym\"));\nvar Document_1 = require(\"./Document\");\nvar Collection = /** @class */ (function () {\n function Collection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.individualDocuments = {};\n this.individualOverrides = {};\n this.individualSynonyms = {};\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new Documents_1.default(this.name, this.apiCall, this.configuration);\n this._overrides = new Overrides_1.default(this.name, this.apiCall);\n this._synonyms = new Synonyms_1.default(this.name, this.apiCall);\n }\n Collection.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Collection.prototype.exists = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.retrieve()];\n case 1:\n _a.sent();\n return [2 /*return*/, true];\n case 2:\n e_1 = _a.sent();\n if (e_1 instanceof Errors_1.ObjectNotFound)\n return [2 /*return*/, false];\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Collection.prototype.documents = function (documentId) {\n if (!documentId) {\n return this._documents;\n }\n else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall);\n }\n return this.individualDocuments[documentId];\n }\n };\n Collection.prototype.overrides = function (overrideId) {\n if (overrideId === undefined) {\n return this._overrides;\n }\n else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override_1.default(this.name, overrideId, this.apiCall);\n }\n return this.individualOverrides[overrideId];\n }\n };\n Collection.prototype.synonyms = function (synonymId) {\n if (synonymId === undefined) {\n return this._synonyms;\n }\n else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym_1.default(this.name, synonymId, this.apiCall);\n }\n return this.individualSynonyms[synonymId];\n }\n };\n Collection.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.name);\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/collections\";\nvar Collections = /** @class */ (function () {\n function Collections(apiCall) {\n this.apiCall = apiCall;\n }\n Collections.prototype.create = function (schema, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Object.defineProperty(Collections, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Collections;\n}());\nexports.default = Collections;\n//# sourceMappingURL=Collections.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logger = __importStar(require(\"loglevel\"));\nvar Errors_1 = require(\"./Errors\");\nvar Configuration = /** @class */ (function () {\n function Configuration(options) {\n var _this = this;\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map(function (node) { return _this.setDefaultPathInNode(node); })\n .map(function (node) { return _this.setDefaultPortInNode(node); })\n .map(function (node) { return (__assign({}, node)); }); // Make a deep copy\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n this.additionalHeaders = options.additionalHeaders;\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n this.showDeprecationWarnings(options);\n this.validate();\n }\n Configuration.prototype.validate = function () {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\");\n }\n if (this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\");\n }\n if (this.apiKey == null) {\n throw new Errors_1.MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n return true;\n };\n Configuration.prototype.validateNodes = function () {\n var _this = this;\n return this.nodes.some(function (node) {\n return _this.isNodeMissingAnyParameters(node);\n });\n };\n Configuration.prototype.isNodeMissingAnyParameters = function (node) {\n return (![\"protocol\", \"host\", \"port\", \"path\"].every(function (key) {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null);\n };\n Configuration.prototype.setDefaultPathInNode = function (node) {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n };\n Configuration.prototype.setDefaultPortInNode = function (node) {\n if (node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n };\n Configuration.prototype.showDeprecationWarnings = function (options) {\n if (options.timeoutSeconds) {\n this.logger.warn(\"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\");\n }\n if (options.masterNode) {\n this.logger.warn(\"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\");\n }\n };\n Configuration.prototype.shuffleArray = function (array) {\n var _a;\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1];\n }\n };\n return Configuration;\n}());\nexports.default = Configuration;\n//# sourceMappingURL=Configuration.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Conversations_1 = __importDefault(require(\"./Conversations\"));\nvar Conversation = /** @class */ (function () {\n function Conversation(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Conversation.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.endpointPath = function () {\n return \"\".concat(Conversations_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel = /** @class */ (function () {\n function ConversationModel(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n ConversationModel.prototype.update = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.endpointPath = function () {\n return \"\".concat(ConversationModels_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/conversations/models\";\nvar ConversationModels = /** @class */ (function () {\n function ConversationModels(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n ConversationModels.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModels.prototype.endpointPath = function (operation) {\n return \"\".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(ConversationModels, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return ConversationModels;\n}());\nexports.default = ConversationModels;\n//# sourceMappingURL=ConversationModels.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConversationModels_1 = __importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = __importDefault(require(\"./ConversationModel\"));\nvar RESOURCEPATH = \"/conversations\";\nvar Conversations = /** @class */ (function () {\n function Conversations(apiCall) {\n this.apiCall = apiCall;\n this.individualConversationModels = {};\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels_1.default(this.apiCall);\n }\n Conversations.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Conversations.prototype.models = function (id) {\n if (id === undefined) {\n return this._conversationsModels;\n }\n else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel_1.default(id, this.apiCall);\n }\n return this.individualConversationModels[id];\n }\n };\n Object.defineProperty(Conversations, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Conversations;\n}());\nexports.default = Conversations;\n//# sourceMappingURL=Conversations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Debug;\n}());\nexports.default = Debug;\n//# sourceMappingURL=Debug.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Documents_1 = __importDefault(require(\"./Documents\"));\nvar Document = /** @class */ (function () {\n function Document(collectionName, documentId, apiCall) {\n this.collectionName = collectionName;\n this.documentId = documentId;\n this.apiCall = apiCall;\n }\n Document.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)];\n });\n });\n };\n Document.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(this.documentId);\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar Documents = /** @class */ (function (_super) {\n __extends(Documents, _super);\n function Documents(collectionName, apiCall, configuration) {\n return _super.call(this, collectionName, apiCall, configuration) || this;\n }\n Documents.prototype.create = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)];\n });\n });\n };\n Documents.prototype.upsert = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"upsert\" }))];\n });\n });\n };\n Documents.prototype.update = function (document, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!document)\n throw new Error(\"No document provided\");\n if (options[\"filter_by\"] != null) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))];\n }\n else {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: \"update\" }))];\n }\n return [2 /*return*/];\n });\n });\n };\n Documents.prototype.delete = function (query) {\n if (query === void 0) { query = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)];\n });\n });\n };\n Documents.prototype.createMany = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.configuration.logger.warn(\"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\");\n return [2 /*return*/, this.import(documents, options)];\n });\n });\n };\n Documents.prototype.import = function (documents, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map(function (document) { return JSON.stringify(document); })\n .join(\"\\n\");\n }\n catch (error) {\n // if rangeerror, throw custom error message\n if (RangeError instanceof error &&\n (error === null || error === void 0 ? void 0 : error.includes(\"Too many properties to enumerate\"))) {\n throw new Error(\"\".concat(error, \"\\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\\n\\n Please try reducing the number of keys in your document, or using CURL to import your data.\\n \"));\n }\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n }\n else {\n documentsInJSONLFormat = documents;\n }\n return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\n if (Array.isArray(documents)) {\n resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map(function (r) { return JSON.parse(r); });\n failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; });\n if (failedItems.length > 0) {\n throw new Errors_1.ImportError(\"\".concat(resultsInJSONFormat.length - failedItems.length, \" documents imported successfully, \").concat(failedItems.length, \" documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document.\"), resultsInJSONFormat);\n }\n else {\n return [2 /*return*/, resultsInJSONFormat];\n }\n }\n else {\n return [2 /*return*/, resultsInJSONLFormat];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n Documents.prototype.export = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options)];\n });\n });\n };\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n Documents.prototype.exportStream = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n })];\n });\n });\n };\n return Documents;\n}(SearchOnlyDocuments_1.SearchOnlyDocuments));\nexports.default = Documents;\n//# sourceMappingURL=Documents.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n __extends(HTTPError, _super);\n function HTTPError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return HTTPError;\n}(TypesenseError_1.default));\nexports.default = HTTPError;\n//# sourceMappingURL=HTTPError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n __extends(ImportError, _super);\n function ImportError(message, importResults) {\n var _this = _super.call(this, message) || this;\n _this.importResults = importResults;\n return _this;\n }\n return ImportError;\n}(TypesenseError_1.default));\nexports.default = ImportError;\n//# sourceMappingURL=ImportError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n __extends(MissingConfigurationError, _super);\n function MissingConfigurationError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MissingConfigurationError;\n}(TypesenseError_1.default));\nexports.default = MissingConfigurationError;\n//# sourceMappingURL=MissingConfigurationError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n __extends(ObjectAlreadyExists, _super);\n function ObjectAlreadyExists() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectAlreadyExists;\n}(TypesenseError_1.default));\nexports.default = ObjectAlreadyExists;\n//# sourceMappingURL=ObjectAlreadyExists.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n __extends(ObjectNotFound, _super);\n function ObjectNotFound() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectNotFound;\n}(TypesenseError_1.default));\nexports.default = ObjectNotFound;\n//# sourceMappingURL=ObjectNotFound.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n __extends(ObjectUnprocessable, _super);\n function ObjectUnprocessable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObjectUnprocessable;\n}(TypesenseError_1.default));\nexports.default = ObjectUnprocessable;\n//# sourceMappingURL=ObjectUnprocessable.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n __extends(RequestMalformed, _super);\n function RequestMalformed() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestMalformed;\n}(TypesenseError_1.default));\nexports.default = RequestMalformed;\n//# sourceMappingURL=RequestMalformed.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n __extends(RequestUnauthorized, _super);\n function RequestUnauthorized() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return RequestUnauthorized;\n}(TypesenseError_1.default));\nexports.default = RequestUnauthorized;\n//# sourceMappingURL=RequestUnauthorized.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n __extends(ServerError, _super);\n function ServerError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ServerError;\n}(TypesenseError_1.default));\nexports.default = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TypesenseError = /** @class */ (function (_super) {\n __extends(TypesenseError, _super);\n // Source: https://stackoverflow.com/a/58417721/123545\n function TypesenseError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.name = _newTarget.name;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TypesenseError;\n}(Error));\nexports.default = TypesenseError;\n//# sourceMappingURL=TypesenseError.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0;\nvar HTTPError_1 = __importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = __importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = __importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = __importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = __importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = __importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = __importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = __importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = __importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = __importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Health;\n}());\nexports.default = Health;\n//# sourceMappingURL=Health.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Keys_1 = __importDefault(require(\"./Keys\"));\nvar Key = /** @class */ (function () {\n function Key(id, apiCall) {\n this.id = id;\n this.apiCall = apiCall;\n }\n Key.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Key.prototype.endpointPath = function () {\n return \"\".concat(Keys_1.default.RESOURCEPATH, \"/\").concat(this.id);\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar crypto_1 = require(\"crypto\");\nvar RESOURCEPATH = \"/keys\";\nvar Keys = /** @class */ (function () {\n function Keys(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n Keys.prototype.create = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n var paramsJSON = JSON.stringify(parameters);\n var digest = Buffer.from((0, crypto_1.createHmac)(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\"));\n var keyPrefix = searchKey.substr(0, 4);\n var rawScopedKey = \"\".concat(digest).concat(keyPrefix).concat(paramsJSON);\n return Buffer.from(rawScopedKey).toString(\"base64\");\n };\n Object.defineProperty(Keys, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Keys;\n}());\nexports.default = Keys;\n//# sourceMappingURL=Keys.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Metrics.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar RESOURCEPATH = \"/multi_search\";\nvar MultiSearch = /** @class */ (function () {\n function MultiSearch(apiCall, configuration, useTextContentType) {\n if (useTextContentType === void 0) { useTextContentType = false; }\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.useTextContentType = useTextContentType;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n MultiSearch.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) {\n if (commonParams === void 0) { commonParams = {}; }\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c;\n return __awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams;\n return __generator(this, function (_d) {\n additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n queryParams = Object.assign({}, commonParams, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/operations\";\nvar Operations = /** @class */ (function () {\n function Operations(apiCall) {\n this.apiCall = apiCall;\n }\n Operations.prototype.perform = function (operationName, queryParameters) {\n if (queryParameters === void 0) { queryParameters = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(\"\".concat(RESOURCEPATH, \"/\").concat(operationName), {}, queryParameters)];\n });\n });\n };\n return Operations;\n}());\nexports.default = Operations;\n//# sourceMappingURL=Operations.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Overrides_1 = __importDefault(require(\"./Overrides\"));\nvar Override = /** @class */ (function () {\n function Override(collectionName, overrideId, apiCall) {\n this.collectionName = collectionName;\n this.overrideId = overrideId;\n this.apiCall = apiCall;\n }\n Override.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Override.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(this.overrideId);\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/overrides\";\nvar Overrides = /** @class */ (function () {\n function Overrides(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Overrides.prototype.upsert = function (overrideId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)];\n });\n });\n };\n Overrides.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Overrides.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Overrides, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Overrides;\n}());\nexports.default = Overrides;\n//# sourceMappingURL=Overrides.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Presets_1 = __importDefault(require(\"./Presets\"));\nvar Preset = /** @class */ (function () {\n function Preset(presetId, apiCall) {\n this.presetId = presetId;\n this.apiCall = apiCall;\n }\n Preset.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Preset.prototype.endpointPath = function () {\n return \"\".concat(Presets_1.default.RESOURCEPATH, \"/\").concat(this.presetId);\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/presets\";\nvar Presets = /** @class */ (function () {\n function Presets(apiCall) {\n this.apiCall = apiCall;\n }\n Presets.prototype.upsert = function (presetId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Presets.prototype.endpointPath = function (operation) {\n return \"\".concat(Presets.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Presets, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Presets;\n}());\nexports.default = Presets;\n//# sourceMappingURL=Presets.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultCacheResponseForSeconds = 2 * 60;\nvar defaultMaxSize = 100;\nvar RequestWithCache = /** @class */ (function () {\n function RequestWithCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n RequestWithCache.prototype.clearCache = function () {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n };\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b;\n isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n if (isCacheDisabled) {\n return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))];\n }\n requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments);\n cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n now = Date.now();\n if (cacheEntry) {\n isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return [2 /*return*/, Promise.resolve(cacheEntry.response)];\n }\n else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON);\n if (cachePromiseEntry) {\n isEntryValid = now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry);\n return [2 /*return*/, cachePromiseEntry.responsePromise];\n }\n else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false));\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise: responsePromise,\n });\n return [4 /*yield*/, responsePromise];\n case 1:\n response = _c.sent();\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response: response,\n });\n isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Configuration_1 = __importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = __importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = __importDefault(require(\"./MultiSearch\"));\nvar SearchOnlyCollection_1 = require(\"./SearchOnlyCollection\");\nvar SearchClient = /** @class */ (function () {\n function SearchClient(options) {\n var _a;\n options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true;\n if (options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000) {\n console.warn(\"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\");\n options.sendApiKeyAsQueryParam = false;\n }\n this.configuration = new Configuration_1.default(options);\n this.apiCall = new ApiCall_1.default(this.configuration);\n this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n SearchClient.prototype.clearCache = function () {\n this.multiSearch.clearCache();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(function (_a) {\n var _ = _a[0], collection = _a[1];\n collection.documents().clearCache();\n });\n };\n SearchClient.prototype.collections = function (collectionName) {\n if (!collectionName) {\n throw new Error(\"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\");\n }\n else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration);\n }\n return this.individualCollections[collectionName];\n }\n };\n return SearchClient;\n}());\nexports.default = SearchClient;\n//# sourceMappingURL=SearchClient.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyCollection = void 0;\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nvar SearchOnlyCollection = /** @class */ (function () {\n function SearchOnlyCollection(name, apiCall, configuration) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration);\n }\n SearchOnlyCollection.prototype.documents = function () {\n return this._documents;\n };\n return SearchOnlyCollection;\n}());\nexports.SearchOnlyCollection = SearchOnlyCollection;\n//# sourceMappingURL=SearchOnlyCollection.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar RequestWithCache_1 = __importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/documents\";\nvar SearchOnlyDocuments = /** @class */ (function () {\n function SearchOnlyDocuments(collectionName, apiCall, configuration) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n this.configuration = configuration;\n this.requestWithCache = new RequestWithCache_1.default();\n }\n SearchOnlyDocuments.prototype.clearCache = function () {\n this.requestWithCache.clearCache();\n };\n SearchOnlyDocuments.prototype.search = function (searchParameters, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration\n .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d;\n return __awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, key, queryParams;\n return __generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n queryParams = Object.assign({}, searchParameters, additionalQueryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath(\"search\"), queryParams, { abortSignal: abortSignal }], {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n })];\n });\n });\n };\n SearchOnlyDocuments.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(SearchOnlyDocuments, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return SearchOnlyDocuments;\n}());\nexports.SearchOnlyDocuments = SearchOnlyDocuments;\n//# sourceMappingURL=SearchOnlyDocuments.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Stopwords_1 = __importDefault(require(\"./Stopwords\"));\nvar Stopword = /** @class */ (function () {\n function Stopword(stopwordId, apiCall) {\n this.stopwordId = stopwordId;\n this.apiCall = apiCall;\n }\n Stopword.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.endpointPath = function () {\n return \"\".concat(Stopwords_1.default.RESOURCEPATH, \"/\").concat(this.stopwordId);\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RESOURCEPATH = \"/stopwords\";\nvar Stopwords = /** @class */ (function () {\n function Stopwords(apiCall) {\n this.apiCall = apiCall;\n }\n Stopwords.prototype.upsert = function (stopwordId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)];\n });\n });\n };\n Stopwords.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopwords.prototype.endpointPath = function (operation) {\n return \"\".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Stopwords, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Stopwords;\n}());\nexports.default = Stopwords;\n//# sourceMappingURL=Stopwords.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar Synonyms_1 = __importDefault(require(\"./Synonyms\"));\nvar Synonym = /** @class */ (function () {\n function Synonym(collectionName, synonymId, apiCall) {\n this.collectionName = collectionName;\n this.synonymId = synonymId;\n this.apiCall = apiCall;\n }\n Synonym.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.endpointPath = function () {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(this.synonymId);\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Collections_1 = __importDefault(require(\"./Collections\"));\nvar RESOURCEPATH = \"/synonyms\";\nvar Synonyms = /** @class */ (function () {\n function Synonyms(collectionName, apiCall) {\n this.collectionName = collectionName;\n this.apiCall = apiCall;\n }\n Synonyms.prototype.upsert = function (synonymId, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)];\n });\n });\n };\n Synonyms.prototype.retrieve = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonyms.prototype.endpointPath = function (operation) {\n return \"\".concat(Collections_1.default.RESOURCEPATH, \"/\").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + operation);\n };\n Object.defineProperty(Synonyms, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return Synonyms;\n}());\nexports.default = Synonyms;\n//# sourceMappingURL=Synonyms.js.map","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","\"use strict\";\n\nexport class Configuration {\n constructor(options = {}) {\n this.server = options.server || {\n nodes: [\n {\n host: \"localhost\",\n port: \"8108\",\n path: \"\",\n protocol: \"http\",\n },\n ],\n };\n\n this.server.cacheSearchResultsForSeconds = this.server.cacheSearchResultsForSeconds ?? 2 * 60;\n\n this.additionalSearchParameters = options.additionalSearchParameters ?? {};\n\n this.additionalSearchParameters.query_by =\n this.additionalSearchParameters.queryBy ?? this.additionalSearchParameters.query_by ?? \"\";\n\n this.additionalSearchParameters.preset =\n this.additionalSearchParameters.preset ?? this.additionalSearchParameters.preset ?? \"\";\n\n this.additionalSearchParameters.sort_by =\n this.additionalSearchParameters.sortBy ?? this.additionalSearchParameters.sort_by ?? \"\";\n\n this.additionalSearchParameters.highlight_full_fields =\n this.additionalSearchParameters.highlightFullFields ??\n this.additionalSearchParameters.highlight_full_fields ??\n this.additionalSearchParameters.query_by;\n\n this.geoLocationField = options.geoLocationField ?? \"_geoloc\";\n this.facetableFieldsWithSpecialCharacters = options.facetableFieldsWithSpecialCharacters ?? [];\n\n this.collectionSpecificSearchParameters = options.collectionSpecificSearchParameters ?? {};\n\n Object.keys(this.collectionSpecificSearchParameters).forEach((collection) => {\n const params = this.collectionSpecificSearchParameters[collection];\n params.query_by = params.queryBy ?? params.query_by;\n params.preset = params.preset ?? params.preset;\n params.sort_by = params.sortBy ?? params.sort_by;\n params.highlight_full_fields =\n params.highlightFullFields ??\n params.highlight_full_fields ??\n this.additionalSearchParameters.highlight_full_fields ??\n params.query_by;\n\n // Remove undefined values\n Object.keys(params).forEach((key) => (params[key] === undefined ? delete params[key] : {}));\n });\n\n this.renderingContent = options.renderingContent;\n this.flattenGroupedHits = options.flattenGroupedHits ?? true;\n this.facetByOptions = options.facetByOptions ?? {};\n this.filterByOptions = options.filterByOptions ?? {};\n this.sortByOptions = options.sortByOptions ?? {};\n this.collectionSpecificFacetByOptions = options.collectionSpecificFacetByOptions ?? {};\n this.collectionSpecificFilterByOptions = options.collectionSpecificFilterByOptions ?? {};\n this.collectionSpecificSortByOptions = options.collectionSpecificSortByOptions ?? {};\n this.useExcludeForUnboundNumericRange = options.useExcludeForUnboundNumericRange ?? false;\n }\n\n validate() {\n // Warn if camelCased parameters are used, suggest using snake_cased parameters instead\n if (\n this.additionalSearchParameters.queryBy ||\n Object.values(this.collectionSpecificSearchParameters).some((c) => c.queryBy)\n ) {\n console.warn(\n \"[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version.\" +\n \" We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js.\",\n );\n }\n\n /*\n * Either additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or\n * All collectionSpecificSearchParameters need to have query_by or preset\n *\n * */\n if (\n this.additionalSearchParameters.query_by.length === 0 &&\n this.additionalSearchParameters.preset.length === 0 &&\n (Object.keys(this.collectionSpecificSearchParameters).length === 0 ||\n Object.values(this.collectionSpecificSearchParameters).some(\n (c) => (c.query_by || \"\").length === 0 && (c.preset || \"\").length === 0,\n ))\n ) {\n throw new Error(\n \"[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.\",\n );\n }\n }\n}\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n // option to exclude unbound ranges \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && parseInt(filtersHash[field][\">=\"]) > parseInt(filtersHash[field][\"<=\"])) {\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export const utils = {\n _adaptHighlightTag(value, highlightPreTag, highlightPostTag) {\n return value\n .replace(new RegExp(\"\", \"g\"), highlightPreTag || \"\")\n .replace(new RegExp(\"\", \"g\"), highlightPostTag || \"\");\n },\n _adaptNumberOfPages() {\n const result = this.typesenseResponse.found / this.typesenseResponse.request_params.per_page;\n if (Number.isFinite(result)) {\n return Math.ceil(result);\n } else {\n return 1;\n }\n },\n};\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class SearchResponseAdapter {\n constructor(\n typesenseResponse,\n instantsearchRequest,\n configuration,\n allTypesenseResults = [],\n fullTypesenseResponse = {},\n ) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n this.configuration = configuration;\n this.allTypesenseResults = allTypesenseResults;\n this.fullTypesenseResponse = fullTypesenseResponse;\n }\n\n _adaptGroupedHits(typesenseGroupedHits) {\n let adaptedResult = [];\n\n adaptedResult = typesenseGroupedHits.map((groupedHit) => {\n const adaptedHits = this._adaptHits(groupedHit.hits);\n adaptedHits.forEach((hit) => {\n hit[\"group_key\"] = hit[\"_group_key\"] = groupedHit.group_key;\n if (groupedHit.found) {\n hit[\"_group_found\"] = groupedHit.found;\n }\n });\n return adaptedHits;\n });\n\n // adaptedResult is now in the form of [[{}, {}], [{}, {}], ...]\n // where each element in the outermost array corresponds to a group.\n\n if (this.configuration.flattenGroupedHits) {\n // We flatten it to [{}, {}, {}]\n adaptedResult = adaptedResult.flat();\n } else {\n // We flatten it to [{ ..., grouped_hits: [{}, {}] }, {}, {}]\n // We set the first element in the group as the hit, and then add a new key called grouped_hits with the other hits\n adaptedResult = adaptedResult.map((adaptedGroupedHit) => {\n return {\n ...adaptedGroupedHit[0],\n _grouped_hits: adaptedGroupedHit,\n };\n });\n }\n\n return adaptedResult;\n }\n\n _adaptHits(typesenseHits) {\n let adaptedResult = [];\n adaptedResult = typesenseHits.map((typesenseHit) => {\n const adaptedHit = {\n ...typesenseHit.document,\n };\n adaptedHit.objectID = typesenseHit.document.id;\n adaptedHit._snippetResult = this._adaptHighlightResult(typesenseHit, \"snippet\");\n adaptedHit._highlightResult = this._adaptHighlightResult(typesenseHit, \"value\");\n adaptedHit._rawTypesenseHit = typesenseHit;\n\n // We're adding `conversation` into each hit, since there doesn't seem to be any other way to pass this up to Instantsearch outside of hits\n if (this.fullTypesenseResponse.conversation) {\n adaptedHit._rawTypesenseConversation = this.fullTypesenseResponse.conversation;\n }\n\n // Add metadata fields to result, if a field with that name doesn't already exist\n [\n \"text_match\",\n \"geo_distance_meters\",\n \"curated\",\n \"text_match_info\",\n \"hybrid_search_info\",\n \"vector_distance\",\n ].forEach((metadataField) => {\n if (Object.keys(typesenseHit).includes(metadataField) && !Object.keys(adaptedHit).includes(metadataField)) {\n adaptedHit[metadataField] = typesenseHit[metadataField];\n }\n });\n\n const geoLocationValue = adaptedHit[this.configuration.geoLocationField];\n if (geoLocationValue) {\n adaptedHit._geoloc = {\n lat: geoLocationValue[0],\n lng: geoLocationValue[1],\n };\n }\n\n return adaptedHit;\n });\n return adaptedResult;\n }\n\n _adaptHighlightResult(typesenseHit, snippetOrValue) {\n const result = {};\n\n // If there is a highlight object available (as of v0.24.0),\n // And the highlight object uses the highlight format available in v0.24.0.rcn32 and above\n // use that instead of the highlights array, since it supports highlights of nested fields\n if (typesenseHit.highlight != null && this.isHighlightPost0240RCN32Format(typesenseHit.highlight)) {\n this.adaptHighlightObject(typesenseHit, result, snippetOrValue);\n } else {\n this.adaptHighlightsArray(typesenseHit, result, snippetOrValue);\n }\n return result;\n }\n\n isHighlightPost0240RCN32Format(highlight) {\n return highlight.full == null && highlight.snippet == null;\n }\n\n adaptHighlightsArray(typesenseHit, result, snippetOrValue) {\n // Algolia lists all searchable attributes in this key, even if there are no matches\n // So do the same and then override highlights\n\n Object.assign(\n result,\n ...Object.entries(typesenseHit.document).map(([attribute, value]) => ({\n [attribute]: {\n value: value,\n matchLevel: \"none\",\n matchedWords: [],\n },\n })),\n );\n\n typesenseHit.highlights.forEach((highlight) => {\n result[highlight.field] = {\n value: highlight[snippetOrValue] || highlight[`${snippetOrValue}s`],\n matchLevel: \"full\",\n matchedWords: highlight.matched_tokens,\n };\n\n if (highlight.indices) {\n result[highlight.field][\"matchedIndices\"] = highlight.indices;\n }\n });\n\n // Now convert any values that have an array value\n // Also, replace highlight tag\n Object.entries(result).forEach(([k, v]) => {\n const attribute = k;\n const { value, matchLevel, matchedWords, matchedIndices } = v;\n if (value == null) {\n result[attribute] = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n // Algolia lists all values of the key in highlights, even those that don't have any highlights\n // So add all values of the array field, including highlights\n result[attribute] = [];\n typesenseHit.document[attribute].forEach((unhighlightedValueFromArray, index) => {\n if (matchedIndices && matchedIndices.includes(index)) {\n result[attribute].push({\n value: this._adaptHighlightTag(\n `${value[matchedIndices.indexOf(index)]}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: matchLevel,\n matchedWords: matchedWords[index],\n });\n } else if (typeof unhighlightedValueFromArray === \"object\") {\n // Handle arrays of objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute].push(this._adaptHighlightInObjectValue(unhighlightedValueFromArray, {}, snippetOrValue));\n } else {\n result[attribute].push({\n value: `${unhighlightedValueFromArray}`,\n matchLevel: \"none\",\n matchedWords: [],\n });\n }\n });\n } else if (typeof value === \"object\") {\n // Handle nested objects\n // Side note: Typesense does not support highlights for nested objects in this `highlights` array,\n // so we pass in an empty object below\n result[attribute] = this._adaptHighlightInObjectValue(value, {}, snippetOrValue);\n } else {\n // Convert all values to strings\n result[attribute].value = this._adaptHighlightTag(\n `${value}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n );\n }\n });\n }\n\n adaptHighlightObject(typesenseHit, result, snippetOrValue) {\n Object.assign(\n result,\n this._adaptHighlightInObjectValue(typesenseHit.document, typesenseHit.highlight, snippetOrValue),\n );\n }\n\n _adaptHighlightInObjectValue(objectValue, highlightObjectValue, snippetOrValue) {\n return Object.assign(\n {},\n ...Object.entries(objectValue).map(([attribute, value]) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(\n value,\n highlightObjectValue?.[attribute] ?? [],\n snippetOrValue,\n );\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(\n value,\n highlightObjectValue?.[attribute] ?? {},\n snippetOrValue,\n );\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightObjectValue?.[attribute], snippetOrValue);\n }\n\n return {\n [attribute]: adaptedValue,\n };\n }),\n );\n }\n\n _adaptHighlightInArrayValue(arrayValue, highlightArrayValue, snippetOrValue) {\n return arrayValue.map((value, index) => {\n let adaptedValue;\n if (value == null) {\n adaptedValue = this._adaptHighlightNullValue();\n } else if (Array.isArray(value)) {\n adaptedValue = this._adaptHighlightInArrayValue(value, highlightArrayValue?.[index] ?? [], snippetOrValue);\n } else if (typeof value === \"object\") {\n adaptedValue = this._adaptHighlightInObjectValue(value, highlightArrayValue?.[index] ?? {}, snippetOrValue);\n } else {\n adaptedValue = this._adaptHighlightInPrimitiveValue(value, highlightArrayValue?.[index], snippetOrValue);\n }\n return adaptedValue;\n });\n }\n\n _adaptHighlightInPrimitiveValue(primitiveValue, highlightPrimitiveValue, snippetOrValue) {\n if (highlightPrimitiveValue != null) {\n return {\n value: this._adaptHighlightTag(\n `${\n highlightPrimitiveValue[snippetOrValue] ??\n highlightPrimitiveValue[\"highlight\"] ??\n highlightPrimitiveValue[\"snippet\"]\n }`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: (highlightPrimitiveValue.matched_tokens || []).length > 0 ? \"full\" : \"none\",\n matchedWords: highlightPrimitiveValue.matched_tokens || [],\n };\n } else {\n return {\n // Convert all values to strings\n value: this._adaptHighlightTag(\n `${primitiveValue}`,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n }\n\n _adaptHighlightNullValue() {\n return {\n value: \"\",\n matchLevel: \"none\",\n matchedWords: [],\n };\n }\n\n _adaptFacets(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n Object.assign(adaptedResult, {\n [facet.field_name]: Object.assign({}, ...facet.counts.map((count) => ({ [count.value]: count.count }))),\n });\n });\n return adaptedResult;\n }\n\n _adaptFacetStats(typesenseFacetCounts) {\n const adaptedResult = {};\n typesenseFacetCounts.forEach((facet) => {\n if (Object.keys(facet.stats).length > 0) {\n Object.assign(adaptedResult, {\n [facet.field_name]: facet.stats,\n });\n }\n });\n return adaptedResult;\n }\n\n _adaptRenderingContent(typesenseFacetCounts) {\n const adaptedResult = Object.assign({}, this.configuration.renderingContent);\n\n // Only set facet ordering if the user has not set one\n if (adaptedResult.facetOrdering?.facets?.order == null) {\n adaptedResult.facetOrdering = adaptedResult.facetOrdering || {};\n adaptedResult.facetOrdering.facets = adaptedResult.facetOrdering.facets || {};\n adaptedResult.facetOrdering.facets.order = [\n ...new Set(\n typesenseFacetCounts\n .map((fc) => fc[\"field_name\"])\n .concat(\n this.allTypesenseResults\n .map((r) => r.facet_counts || [])\n .flat()\n .map((fc) => fc[\"field_name\"])\n .filter((f) => f),\n ),\n ),\n ];\n }\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedRenderingContent = this._adaptRenderingContent(this.typesenseResponse.facet_counts || []);\n const adaptedResult = {\n hits: this.typesenseResponse.grouped_hits\n ? this._adaptGroupedHits(this.typesenseResponse.grouped_hits)\n : this._adaptHits(this.typesenseResponse.hits),\n nbHits: this.typesenseResponse.found,\n page: this.typesenseResponse.page - 1,\n nbPages: this._adaptNumberOfPages(),\n hitsPerPage: this.typesenseResponse.request_params.per_page,\n facets: this._adaptFacets(this.typesenseResponse.facet_counts || []),\n facets_stats: this._adaptFacetStats(this.typesenseResponse.facet_counts || {}),\n query: this.typesenseResponse.request_params.q,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n ...(Object.keys(adaptedRenderingContent).length > 0 ? { renderingContent: adaptedRenderingContent } : null),\n };\n\n // If no results were found for the search, but there is still a conversation response,\n // still send that as a hit so the conversation is accessible via Instantsearch\n if (this.fullTypesenseResponse.conversation && adaptedResult.hits.length === 0) {\n adaptedResult.hits = [\n {\n _rawTypesenseConversation: this.fullTypesenseResponse.conversation,\n },\n ];\n }\n\n // console.log(adaptedResult);\n return adaptedResult;\n }\n}\n\nObject.assign(SearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { utils } from \"./support/utils\";\n\nexport class FacetSearchResponseAdapter {\n constructor(typesenseResponse, instantsearchRequest) {\n this.typesenseResponse = typesenseResponse;\n this.instantsearchRequest = instantsearchRequest;\n }\n\n _adaptFacetHits(typesenseFacetCounts) {\n let adaptedResult = {};\n const facet = typesenseFacetCounts.find((facet) => facet.field_name === this.instantsearchRequest.params.facetName);\n\n adaptedResult = facet.counts.map((facetCount) => ({\n value: facetCount.value,\n highlighted: this._adaptHighlightTag(\n facetCount.highlighted,\n this.instantsearchRequest.params.highlightPreTag,\n this.instantsearchRequest.params.highlightPostTag,\n ),\n count: facetCount.count,\n }));\n\n return adaptedResult;\n }\n\n adapt() {\n const adaptedResult = {\n facetHits: this._adaptFacetHits(this.typesenseResponse.facet_counts),\n exhaustiveFacetsCount: true,\n processingTimeMS: this.typesenseResponse.search_time_ms,\n };\n return adaptedResult;\n }\n}\n\nObject.assign(FacetSearchResponseAdapter.prototype, utils);\n","\"use strict\";\n\nimport { Configuration } from \"./Configuration\";\nimport { SearchClient as TypesenseSearchClient } from \"typesense\";\nimport { SearchRequestAdapter } from \"./SearchRequestAdapter\";\nimport { SearchResponseAdapter } from \"./SearchResponseAdapter\";\nimport { FacetSearchResponseAdapter } from \"./FacetSearchResponseAdapter\";\n\nexport default class TypesenseInstantsearchAdapter {\n constructor(options) {\n this.updateConfiguration(options);\n this.searchClient = {\n clearCache: () => this.clearCache(),\n search: (instantsearchRequests) => this.searchTypesenseAndAdapt(instantsearchRequests),\n searchForFacetValues: (instantsearchRequests) =>\n this.searchTypesenseForFacetValuesAndAdapt(instantsearchRequests),\n };\n }\n\n async searchTypesenseAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new SearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n typesenseResponse.results,\n typesenseResponse,\n );\n let adaptedResponse = responseAdapter.adapt();\n\n return adaptedResponse;\n });\n\n return {\n results: adaptedResponses,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async searchTypesenseForFacetValuesAndAdapt(instantsearchRequests) {\n let typesenseResponse;\n try {\n typesenseResponse = await this._adaptAndPerformTypesenseRequest(instantsearchRequests);\n\n const adaptedResponses = typesenseResponse.results.map((typesenseResult, index) => {\n this._validateTypesenseResult(typesenseResult);\n const responseAdapter = new FacetSearchResponseAdapter(\n typesenseResult,\n instantsearchRequests[index],\n this.configuration,\n );\n return responseAdapter.adapt();\n });\n\n return adaptedResponses;\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async _adaptAndPerformTypesenseRequest(instantsearchRequests) {\n const requestAdapter = new SearchRequestAdapter(instantsearchRequests, this.typesenseClient, this.configuration);\n const typesenseResponse = await requestAdapter.request();\n return typesenseResponse;\n }\n\n clearCache() {\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return this.searchClient;\n }\n\n updateConfiguration(options) {\n this.configuration = new Configuration(options);\n this.configuration.validate();\n this.typesenseClient = new TypesenseSearchClient(this.configuration.server);\n return true;\n }\n\n _validateTypesenseResult(typesenseResult) {\n if (typesenseResult.error) {\n throw new Error(`${typesenseResult.code} - ${typesenseResult.error}`);\n }\n if (!typesenseResult.hits && !typesenseResult.grouped_hits) {\n throw new Error(`Did not find any hits. ${typesenseResult.code} - ${typesenseResult.error}`);\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","definition","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","log","trace","replaceLoggingMethods","level","loggerName","i","length","this","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","undefined","realMethod","Logger","name","defaultLevel","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","cookie","document","location","indexOf","encodeURIComponent","exec","slice","levels","getLevel","setLevel","persist","toUpperCase","SILENT","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","TypeError","logger","_log","noConflict","getLoggers","__createBinding","Object","create","o","m","k","k2","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","hasOwnProperty","__importDefault","Errors","SearchClient","Client","Client_1","default","SearchClient_1","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","done","then","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","op","pop","push","Aliases_1","Alias","apiCall","retrieve","_a","endpointPath","delete","concat","RESOURCEPATH","Aliases","upsert","mapping","put","aliasName","AnalyticsRules_1","AnalyticsRule_1","Analytics","individualAnalyticsRules","_analyticsRules","rules","id","AnalyticsRule","AnalyticsRules","params","operation","axios_1","Errors_1","TypesenseError_1","HEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_b","_c","abortSignal","_d","responseType","_e","performRequest","post","bodyParameters","patch","requestType","_f","_g","_h","_j","_k","skipConnectionTimeout","requestNumber","lastException","_loop_1","this_1","numTries","state_1","_l","validate","Date","now","node","abortListener","requestOptions","cancelToken","source_1","response","error_1","_m","getNextNode","index","aborted","Error","url","uriFor","headers","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","httpsAgent","CancelToken","source","cancel","addEventListener","token","setNodeHealthcheck","customErrorForResponse","message","warn","code","timer","removeEventListener","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_this","forEach","protocol","host","port","path","seconds","setTimeout","messageFromServer","errorMessage","trim","error","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","httpStatus","Configuration_1","ApiCall_1","Collections_1","Collection_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","Stopwords_1","Stopword_1","Conversations_1","Conversation_1","options","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","collections","collectionName","aliases","presets","stopwords","conversations","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","update","schema","exists","e_1","documents","documentId","Document","overrides","overrideId","synonyms","synonymId","Collections","__assign","s","p","Configuration","setDefaultPathInNode","setDefaultPortInNode","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","MissingConfigurationError","isNodeMissingAnyParameters","some","every","key","masterNode","readReplicaNodes","array","j","Math","floor","random","Conversation","ConversationModels_1","ConversationModel","ConversationModels","ConversationModel_1","Conversations","individualConversationModels","_conversationsModels","models","Debug","partialDocument","extendStatics","__extends","d","b","setPrototypeOf","__proto__","Array","String","__","constructor","Documents","_super","action","query","createMany","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","isArray","RangeError","includes","split","r","filter","success","ImportError","export","exportStream","SearchOnlyDocuments","importResults","TypesenseError","_newTarget","HTTPError_1","MissingConfigurationError_1","ObjectAlreadyExists_1","ObjectNotFound_1","ObjectUnprocessable_1","RequestMalformed_1","RequestUnauthorized_1","ServerError_1","ImportError_1","Health","Key","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","createHmac","keyPrefix","substr","rawScopedKey","toString","Metrics","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","clearCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","cacheResponseForSeconds","Operations","operationName","Override","Overrides","Preset","presetId","Presets","__spreadArray","to","pack","ar","l","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","requestTimestamp","set","size","SearchOnlyCollection_1","entries","SearchOnlyCollection","SearchOnlyDocuments_1","search","searchParameters","Stopword","stopwordId","Stopwords","Synonym","Synonyms","_typeof","_regeneratorRuntime","a","c","asyncIterator","u","toStringTag","wrap","Generator","Context","makeInvokeMethod","tryCatch","type","arg","h","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","values","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","async","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","fn","kindOf","cache","thing","str","toLowerCase","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","utils$1","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","position","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","p1","p2","toFiniteNumber","defaultValue","Number","isFinite","global","generateString","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","target","reducedValue","isThenable","catch","AxiosError","config","request","captureStackTrace","toJSON","description","number","fileName","lineNumber","columnNumber","prototype$1","isVisitable","removeBrackets","renderKey","dots","customProps","axiosError","cause","predicates","toFormData","formData","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","isFlatArray","el","exposedHelpers","build","encode$1","charMap","match","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","synchronous","runWhen","eject","clear","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","freeze","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","defaults","transitional","adapter","transformRequest","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","stringifySafely","JSONRequested","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","common","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","tokens","tokensRE","parseTokens","has","matcher","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","first","computed","accessor","accessors","defineAccessor","accessorName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","write","expires","domain","secure","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","hash","hostname","pathname","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","unsubscribe","signal","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","abort","subscribe","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","validators$1","deprecatedWarnings","validator","version","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$1","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","args","_classCallCheck","Constructor","toPropertyKey","toPrimitive","_defineProperties","_createClass","protoProps","staticProps","_this$server$cacheSea","_options$additionalSe","_ref","_this$additionalSearc","_ref2","_this$additionalSearc2","_ref3","_this$additionalSearc3","_ref4","_this$additionalSearc4","_options$geoLocationF","_options$facetableFie","_options$collectionSp","_options$flattenGroup","_options$facetByOptio","_options$filterByOpti","_options$sortByOption","_options$collectionSp2","_options$collectionSp3","_options$collectionSp4","_options$useExcludeFo","server","additionalSearchParameters","query_by","queryBy","preset","sort_by","sortBy","highlight_full_fields","highlightFullFields","geoLocationField","facetableFieldsWithSpecialCharacters","collectionSpecificSearchParameters","collection","_params$queryBy","_params$preset","_params$sortBy","_ref5","_ref6","_params$highlightFull","renderingContent","flattenGroupedHits","facetByOptions","filterByOptions","sortByOptions","collectionSpecificFacetByOptions","collectionSpecificFilterByOptions","collectionSpecificSortByOptions","useExcludeForUnboundNumericRange","_objectWithoutProperties","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_slicedToArray","_excluded","SearchRequestAdapter","instantsearchRequests","typesenseClient","fieldName","_this$configuration$c","_this$configuration$f","exactMatch","facetFilters","adaptedResult","item","intermediateFacetFilters","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","_fieldValues$reduce","reduce","_isNumber","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","_shouldUseExactMatchForField","_escapeFacetValue","typesenseFilterString","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","sanitizedFacetableFieldsWithSpecialCharacters","flat","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","isInteger","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","parseInt","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches4","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl2","_insideBoundingBox$sp2","adaptedAroundRadius","parseFloat","coordinates","instantsearchParams","filters","_adaptFacetFilters","_adaptNumericFilters","_adaptGeoFilter","indexName","INDEX_NAME_MATCHING_REGEX","facets","_this3","facet","_this3$configuration$","instantsearchRequest","_this$configuration$c2","_this$configuration$s","adaptedCollectionName","_adaptIndexName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","adaptedSortBy","_adaptSortBy","q","facet_by","_adaptFacetBy","filter_by","_adaptFilters","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_callee","_searches$","_searches$2","searches","_searches$3","conversation","conversation_id","conversation_model_id","_this4","_context","_buildSearchParameters","searchParams","_toConsumableArray","iter","_defineProperty","utils","_adaptHighlightTag","highlightPreTag","highlightPostTag","_adaptNumberOfPages","typesenseResponse","found","request_params","ceil","ownKeys","_objectSpread","SearchResponseAdapter","allTypesenseResults","fullTypesenseResponse","typesenseGroupedHits","groupedHit","adaptedHits","_adaptHits","hits","hit","group_key","adaptedGroupedHit","_grouped_hits","typesenseHits","typesenseHit","adaptedHit","objectID","_snippetResult","_adaptHighlightResult","_highlightResult","_rawTypesenseHit","_rawTypesenseConversation","metadataField","geoLocationValue","_geoloc","lat","lng","snippetOrValue","highlight","isHighlightPost0240RCN32Format","adaptHighlightObject","adaptHighlightsArray","full","snippet","matchLevel","matchedWords","highlights","matched_tokens","indices","attribute","matchedIndices","_adaptHighlightNullValue","unhighlightedValueFromArray","_adaptHighlightInObjectValue","objectValue","highlightObjectValue","adaptedValue","_ref7","_highlightObjectValue","_adaptHighlightInArrayValue","_highlightObjectValue2","_adaptHighlightInPrimitiveValue","arrayValue","highlightArrayValue","_this5","_highlightArrayValue$","_highlightArrayValue$2","primitiveValue","highlightPrimitiveValue","_ref9","_highlightPrimitiveVa","typesenseFacetCounts","field_name","counts","count","stats","_adaptedResult$facetO","facetOrdering","order","Set","fc","facet_counts","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","FacetSearchResponseAdapter","find","facetCount","highlighted","facetHits","_adaptFacetHits","exhaustiveFacetsCount","TypesenseInstantsearchAdapter","updateConfiguration","searchClient","searchTypesenseAndAdapt","searchForFacetValues","searchTypesenseForFacetValuesAndAdapt","_searchTypesenseAndAdapt","adaptedResponses","_adaptAndPerformTypesenseRequest","results","typesenseResult","_validateTypesenseResult","adapt","t0","_x","_searchTypesenseForFacetValuesAndAdapt","_callee2","_context2","_x2","_adaptAndPerformTypesenseRequest2","_callee3","requestAdapter","_context3","_x3","TypesenseSearchClient"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/SearchRequestAdapter.js b/lib/SearchRequestAdapter.js index d40d67d..3c9cab8 100644 --- a/lib/SearchRequestAdapter.js +++ b/lib/SearchRequestAdapter.js @@ -243,12 +243,12 @@ var SearchRequestAdapter = exports.SearchRequestAdapter = /*#__PURE__*/function }); // Transform that to: - // "field1:=[634..289] && field2:<=5 && field3:>=3" + // "field1:=[634..289] && field2:<=5 && field3:>=3" + // option to exclude unbound ranges var adaptedFilters = []; Object.keys(filtersHash).forEach(function (field) { if (filtersHash[field]["<="] != null && filtersHash[field][">="] != null) { - if (_this2.configuration.useExcludeForUnboundNumericRange && filtersHash[field][">="] > filtersHash[field]["<="]) { - //exclude unbound range: + if (_this2.configuration.useExcludeForUnboundNumericRange && parseInt(filtersHash[field][">="]) > parseInt(filtersHash[field]["<="])) { adaptedFilters.push("".concat(field, ":!=[").concat(filtersHash[field]["<="], "..").concat(filtersHash[field][">="], "]")); } else { adaptedFilters.push("".concat(field, ":=[").concat(filtersHash[field][">="], "..").concat(filtersHash[field]["<="], "]")); diff --git a/lib/SearchRequestAdapter.js.map b/lib/SearchRequestAdapter.js.map index 9f29297..316f9d6 100644 --- a/lib/SearchRequestAdapter.js.map +++ b/lib/SearchRequestAdapter.js.map @@ -1 +1 @@ -{"version":3,"file":"SearchRequestAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","SearchRequestAdapter","_regenerator","_objectWithoutProperties2","_asyncToGenerator2","_slicedToArray2","_classCallCheck2","_createClass2","_excluded","instantsearchRequests","typesenseClient","configuration","additionalSearchParameters","collectionSpecificSearchParameters","key","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","collectionSpecificFilterByOptions","exactMatch","filterByOptions","_adaptFacetFilters","facetFilters","_this","adaptedResult","transformedTypesenseFilters","map","item","Array","isArray","intermediateFacetFilters","forEach","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","keys","length","console","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","facetableFieldsWithSpecialCharacters","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","useExcludeForUnboundNumericRange","warn","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","_ref","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","geoLocationField","Error","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","facet","_this3$configuration$","collectionSpecificFacetByOptions","facetByOptions","_buildSearchParameters","instantsearchRequest","_this$configuration$c2","_this$configuration$s","params","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","assign","adaptedSortBy","collection","q","query","undefined","facet_by","filter_by","sort_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","collectionSpecificSortByOptions","sortByOptions","fromEntries","_ref2","_ref3","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","arguments","get"],"sources":["../src/SearchRequestAdapter.js"],"sourcesContent":["\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && filtersHash[field][\">=\"] > filtersHash[field][\"<=\"]) {\n //exclude unbound range:\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,oBAAA;AAAA,IAAAC,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,yBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAAAQ,kBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAA,IAA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,EAAAvL,SAAA;kBACzG,OAAOwL,oBAAoB;gBAC7B,CAAC,CAAC;cACJ;cAAC,OAAAJ,QAAA,CAAAK,MAAA,WAEM,IAAI,CAACvL,eAAe,CAACwL,WAAW,CAACC,OAAO,CAAC;gBAAEf,QAAQ,EAAEA;cAAS,CAAC,EAAEC,YAAY,CAAC;YAAA;YAAA;cAAA,OAAAO,QAAA,CAAAQ,IAAA;UAAA;QAAA,GAAApB,OAAA;MAAA,CACtF;MAAA,SAAAqB,QAAA;QAAA,OAAAvB,QAAA,CAAAwB,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAF,OAAA;IAAA;EAAA;IAAAvL,GAAA;IAAA0L,GAAA,EAneD,SAAAA,IAAA,EAAuC;MACrC,OAAO,IAAIlI,MAAM,CAAC,0BAA0B,CAAC;IAC/C;EAAC;IAAAxD,GAAA;IAAA0L,GAAA,EAED,SAAAA,IAAA,EAAwD;MACtD,OAAO,IAAIlI,MAAM,CAAC,wBAAwB,CAAC;IAC7C;EAAC;IAAAxD,GAAA;IAAA0L,GAAA,EAED,SAAAA,IAAA,EAA0D;MACxD,OAAO,IAAIlI,MAAM,CAAC,wBAAwB,CAAC;IAC7C;EAAC;AAAA","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"SearchRequestAdapter.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","SearchRequestAdapter","_regenerator","_objectWithoutProperties2","_asyncToGenerator2","_slicedToArray2","_classCallCheck2","_createClass2","_excluded","instantsearchRequests","typesenseClient","configuration","additionalSearchParameters","collectionSpecificSearchParameters","key","_shouldUseExactMatchForField","fieldName","collectionName","_this$configuration$c","_this$configuration$f","collectionSpecificFilterByOptions","exactMatch","filterByOptions","_adaptFacetFilters","facetFilters","_this","adaptedResult","transformedTypesenseFilters","map","item","Array","isArray","intermediateFacetFilters","forEach","facetFilter","_this$_parseFacetFilt","_parseFacetFilter","fieldValue","push","keys","length","console","error","concat","join","fieldValues","_fieldValues$reduce","reduce","result","startsWith","_isNumber","substring","_fieldValues$reduce2","excludedFieldValues","includedFieldValues","typesenseFilterStringComponents","operator","v","_escapeFacetValue","typesenseFilterString","filter","f","_this$_parseFacetFilt2","_this$configuration$f2","filterStringMatchingRegex","facetFilterMatches","facetableFieldsWithSpecialCharacters","sanitizedFacetableFieldsWithSpecialCharacters","flat","replace","RegExp","match","constructor","DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX","Number","isInteger","_adaptNumericFilters","numericFilters","_this2","filtersHash","_this2$_parseNumericF","_parseNumericFilter","adaptedFilters","field","useExcludeForUnboundNumericRange","parseInt","warn","JSON","stringify","numericFilter","_this$configuration$f3","numericFilterMatches","_numericFilterMatches","_numericFilterMatches2","DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX","_numericFilterMatches3","_numericFilterMatches4","_adaptGeoFilter","_ref","insideBoundingBox","aroundRadius","aroundLatLng","insidePolygon","x1","y1","x2","y2","_insideBoundingBox$fl","_insideBoundingBox$fl2","_insideBoundingBox$sp","split","_insideBoundingBox$sp2","geoLocationField","Error","adaptedAroundRadius","parseFloat","coordinates","_adaptFilters","instantsearchParams","filters","_adaptIndexName","indexName","INDEX_NAME_MATCHING_REGEX","_adaptSortBy","_adaptFacetBy","facets","_this3","facet","_this3$configuration$","collectionSpecificFacetByOptions","facetByOptions","_buildSearchParameters","instantsearchRequest","_this$configuration$c2","_this$configuration$s","params","adaptedCollectionName","snakeCasedAdditionalSearchParameters","_i","_Object$entries","entries","_Object$entries$_i","_camelToSnakeCase","_i2","_Object$entries2","_Object$entries2$_i","typesenseSearchParams","assign","adaptedSortBy","collection","q","query","undefined","facet_by","filter_by","sort_by","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","typesenseVectorQuery","vector_query","sortByOption","collectionSpecificSortByOptions","sortByOptions","fromEntries","_ref2","_ref3","_","str","toLowerCase","_request","mark","_callee","_this4","_searches$","_searches$2","searches","commonParams","_searches$3","conversation","conversation_id","conversation_model_id","wrap","_callee$","_context","prev","next","searchParams","modifiedSearchParams","abrupt","multiSearch","perform","stop","request","apply","arguments","get"],"sources":["../src/SearchRequestAdapter.js"],"sourcesContent":["\"use strict\";\n\nexport class SearchRequestAdapter {\n static get INDEX_NAME_MATCHING_REGEX() {\n return new RegExp(\"^(.+?)(?=(/sort/(.*))|$)\");\n }\n\n static get DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*)((?!:).):(?!:)(.*)\");\n }\n\n static get DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX() {\n return new RegExp(\"(.*?)(<=|>=|>|<|=)(.*)\");\n }\n\n constructor(instantsearchRequests, typesenseClient, configuration) {\n this.instantsearchRequests = instantsearchRequests;\n this.typesenseClient = typesenseClient;\n this.configuration = configuration;\n this.additionalSearchParameters = configuration.additionalSearchParameters;\n this.collectionSpecificSearchParameters = configuration.collectionSpecificSearchParameters;\n }\n\n _shouldUseExactMatchForField(fieldName, collectionName) {\n if (\n this.configuration.collectionSpecificFilterByOptions?.[collectionName]?.[fieldName]?.exactMatch === false ||\n this.configuration.filterByOptions?.[fieldName]?.exactMatch === false\n ) {\n return false;\n } else {\n return true;\n }\n }\n\n _adaptFacetFilters(facetFilters, collectionName) {\n let adaptedResult = \"\";\n\n if (!facetFilters) {\n return adaptedResult;\n }\n\n /**\n * Need to transform:\n * facetFilters = [[\"field1:value1\", \"field1:value2\"], \"field2:value3\", \"field2:value4\"]\n *\n * Into this:\n * field1:=[value1,value2] && field2:=value3 && field2:=value4\n *\n * Steps:\n * - For each item in facetFilters\n * - If item is array\n * - OR values together.\n * - Warn if field names are not the same\n * - If item is string, convert to facet:=value format\n * - Join strings by &&\n */\n\n const transformedTypesenseFilters = facetFilters.map((item) => {\n if (Array.isArray(item)) {\n // Need to transform:\n // facetFilters = [\"field1:value1\", \"field1:value2\", \"facetN:valueN\"]\n //\n // Into this:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // \"fieldN\": [\"valueN\"]\n // }\n\n const intermediateFacetFilters = {};\n item.forEach((facetFilter) => {\n const { fieldName, fieldValue } = this._parseFacetFilter(facetFilter);\n intermediateFacetFilters[fieldName] = intermediateFacetFilters[fieldName] || [];\n intermediateFacetFilters[fieldName].push(fieldValue);\n });\n\n if (Object.keys(intermediateFacetFilters).length > 1) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ${Object.keys(\n intermediateFacetFilters,\n ).join(\",\")}`,\n );\n }\n\n // Pick first value from intermediateFacetFilters\n const fieldName = Object.keys(intermediateFacetFilters)[0];\n const fieldValues = intermediateFacetFilters[fieldName];\n\n // Need to transform:\n // intermediateFacetFilters = {\n // \"field1\": [\"value1\", \"value2\"],\n // }\n //\n // Into this:\n // field1:=[value1,value2]\n\n // Partition values into included and excluded values\n const [excludedFieldValues, includedFieldValues] = fieldValues.reduce(\n (result, fieldValue) => {\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n result[0].push(fieldValue.substring(1));\n } else {\n result[1].push(fieldValue);\n }\n return result;\n },\n [[], []],\n );\n\n const typesenseFilterStringComponents = [];\n if (includedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${includedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n if (excludedFieldValues.length > 0) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterStringComponents.push(\n `${fieldName}${operator}[${excludedFieldValues.map((v) => this._escapeFacetValue(v)).join(\",\")}]`,\n );\n }\n\n const typesenseFilterString = typesenseFilterStringComponents.filter((f) => f).join(\" && \");\n\n return typesenseFilterString;\n } else {\n // Need to transform:\n // fieldName:fieldValue\n // Into\n // fieldName:=fieldValue\n\n const { fieldName, fieldValue } = this._parseFacetFilter(item);\n let typesenseFilterString;\n if (fieldValue.startsWith(\"-\") && !this._isNumber(fieldValue)) {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":!=\" : \":!\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue.substring(1))}]`;\n } else {\n const operator = this._shouldUseExactMatchForField(fieldName, collectionName) ? \":=\" : \":\";\n typesenseFilterString = `${fieldName}${operator}[${this._escapeFacetValue(fieldValue)}]`;\n }\n\n return typesenseFilterString;\n }\n });\n\n adaptedResult = transformedTypesenseFilters.join(\" && \");\n // console.log(`${JSON.stringify(facetFilters)} => ${adaptedResult}`);\n\n return adaptedResult;\n }\n\n _parseFacetFilter(facetFilter) {\n let filterStringMatchingRegex, facetFilterMatches, fieldName, fieldValue;\n\n // This is helpful when the filter looks like `facetName:with:colons:facetValue:with:colons` and the default regex above parses the filter as `facetName:with:colons:facetValue:with` and `colon`.\n // So if a facetValue can contain a colon, we ask users to pass in all possible facetable fields in `facetableFieldsWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters\n .flat()\n .map((f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n filterStringMatchingRegex = new RegExp(`^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")}):(.*)$`);\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n if (facetFilterMatches != null) {\n fieldName = `${facetFilterMatches[1]}`;\n fieldValue = `${facetFilterMatches[2]}`;\n\n return {\n fieldName,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet\n // Use the default filter parsing regex, which assumes that only facet names have colons, and not facet values\n filterStringMatchingRegex = this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX;\n facetFilterMatches = facetFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(facetFilter);\n // console.log(facetFilterMatches);\n\n if (facetFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter \\`${facetFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n fieldName = `${facetFilterMatches[1]}${facetFilterMatches[2]}`;\n fieldValue = `${facetFilterMatches[3]}`;\n }\n\n return {\n fieldName,\n fieldValue,\n };\n }\n\n _escapeFacetValue(value) {\n // Don't escape booleans, integers or floats\n if (typeof value === \"boolean\" || value === \"true\" || value === \"false\" || this._isNumber(value)) {\n return value;\n }\n return `\\`${value}\\``;\n }\n\n _isNumber(value) {\n return (\n Number.isInteger(value % 1) || // Mod 1 will automatically try converting string values to integer/float\n !!(value % 1)\n ); // Is Float\n }\n\n _adaptNumericFilters(numericFilters) {\n // Need to transform this:\n // [\"field1<=634\", \"field1>=289\", \"field2<=5\", \"field3>=3\"]\n // to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\"\n let adaptedResult = \"\";\n\n if (!numericFilters) {\n return adaptedResult;\n }\n\n // Transform to intermediate structure:\n // {\n // field1: {\n // \"<=\": 634,\n // \">=\": 289\n // },\n // field2: {\n // \"<=\": 5\n // },\n // field3: {\n // \">=\": 3\n // }\n // };\n const filtersHash = {};\n numericFilters.forEach((filter) => {\n const { fieldName, operator, fieldValue } = this._parseNumericFilter(filter);\n filtersHash[fieldName] = filtersHash[fieldName] || {};\n filtersHash[fieldName][operator] = fieldValue;\n });\n\n // Transform that to:\n // \"field1:=[634..289] && field2:<=5 && field3:>=3\" \n // option to exclude unbound ranges \n const adaptedFilters = [];\n Object.keys(filtersHash).forEach((field) => {\n if (filtersHash[field][\"<=\"] != null && filtersHash[field][\">=\"] != null) {\n if (this.configuration.useExcludeForUnboundNumericRange && parseInt(filtersHash[field][\">=\"]) > parseInt(filtersHash[field][\"<=\"])) {\n adaptedFilters.push(`${field}:!=[${filtersHash[field][\"<=\"]}..${filtersHash[field][\">=\"]}]`);\n } else {\n adaptedFilters.push(`${field}:=[${filtersHash[field][\">=\"]}..${filtersHash[field][\"<=\"]}]`);\n }\n } else if (filtersHash[field][\"<=\"] != null) {\n adaptedFilters.push(`${field}:<=${filtersHash[field][\"<=\"]}`);\n } else if (filtersHash[field][\">=\"] != null) {\n adaptedFilters.push(`${field}:>=${filtersHash[field][\">=\"]}`);\n } else if (filtersHash[field][\"=\"] != null) {\n adaptedFilters.push(`${field}:=${filtersHash[field][\"=\"]}`);\n } else {\n console.warn(\n `[Typesense-Instantsearch-Adapter] Unsupported operator found ${JSON.stringify(filtersHash[field])}`,\n );\n }\n });\n\n adaptedResult = adaptedFilters.join(\" && \");\n return adaptedResult;\n }\n\n _parseNumericFilter(numericFilter) {\n let filterStringMatchingRegex, numericFilterMatches;\n let fieldName, operator, fieldValue;\n\n // The following is helpful when the facetName has special characters like > and the default regex fails to parse it properly.\n // So we ask users to pass in facetable fields in `facetableFieldsWithSpecialCharactersWithSpecialCharacters` when instantiating the adapter, so we can explicitly match against that.\n if (this.configuration.facetableFieldsWithSpecialCharacters?.length > 0) {\n // escape any Regex special characters, source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n const sanitizedFacetableFieldsWithSpecialCharacters = this.configuration.facetableFieldsWithSpecialCharacters.map(\n (f) => f.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"),\n );\n filterStringMatchingRegex = new RegExp(\n `^(${sanitizedFacetableFieldsWithSpecialCharacters.join(\"|\")})(<=|>=|>|<|=)(.*)$`,\n );\n\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n if (numericFilterMatches != null) {\n // If no matches are found or if the above didn't trigger, fall back to the default regex\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n }\n\n // If we haven't found any matches yet, fall back to the default regex\n filterStringMatchingRegex = this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX;\n numericFilterMatches = numericFilter.match(filterStringMatchingRegex);\n\n // console.log(filterStringMatchingRegex);\n // console.log(numericFilter);\n // console.log(numericFilterMatches);\n\n if (numericFilterMatches == null) {\n console.error(\n `[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter \\`${numericFilter}\\` with the Regex \\`${filterStringMatchingRegex}\\`. If you have field names with special characters, be sure to add them to a parameter called \\`facetableFieldsWithSpecialCharacters\\` when instantiating the adapter.`,\n );\n } else {\n [, fieldName, operator, fieldValue] = numericFilterMatches;\n }\n\n return {\n fieldName,\n operator,\n fieldValue,\n };\n }\n\n _adaptGeoFilter({ insideBoundingBox, aroundRadius, aroundLatLng, insidePolygon }) {\n // Give this parameter first priority if it exists, since\n if (insideBoundingBox) {\n let x1, y1, x2, y2;\n if (Array.isArray(insideBoundingBox)) {\n [x1, y1, x2, y2] = insideBoundingBox.flat();\n } else {\n [x1, y1, x2, y2] = insideBoundingBox.split(\",\");\n }\n return `${this.configuration.geoLocationField}:(${x1}, ${y1}, ${x1}, ${y2}, ${x2}, ${y2}, ${x2}, ${y1})`;\n }\n\n if (aroundLatLng || aroundRadius) {\n if (!aroundRadius || aroundRadius === \"all\") {\n throw new Error(\n \"[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. \" +\n \"So the `aroundRadius` parameter is required when `aroundLatLng` is used. \" +\n \"If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).\",\n );\n }\n const adaptedAroundRadius = `${parseFloat(aroundRadius) / 1000} km`; // aroundRadius is in meters\n return `${this.configuration.geoLocationField}:(${aroundLatLng}, ${adaptedAroundRadius})`;\n }\n\n if (insidePolygon) {\n let coordinates = insidePolygon;\n if (Array.isArray(insidePolygon)) {\n coordinates = insidePolygon.flat().join(\",\");\n }\n return `${this.configuration.geoLocationField}:(${coordinates})`;\n }\n }\n\n _adaptFilters(instantsearchParams, collectionName) {\n const adaptedFilters = [];\n\n // `filters` can be used with the `Configure` widget\n // However the format needs to be in the Typesense filter_by format, instead of Algolia filter format.\n if (instantsearchParams.filters) {\n adaptedFilters.push(instantsearchParams.filters);\n }\n adaptedFilters.push(this._adaptFacetFilters(instantsearchParams.facetFilters, collectionName));\n adaptedFilters.push(this._adaptNumericFilters(instantsearchParams.numericFilters));\n adaptedFilters.push(this._adaptGeoFilter(instantsearchParams));\n\n return adaptedFilters.filter((filter) => filter && filter !== \"\").join(\" && \");\n }\n\n _adaptIndexName(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1];\n }\n\n _adaptSortBy(indexName) {\n return indexName.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3];\n }\n\n _adaptFacetBy(facets, collectionName) {\n return [facets]\n .flat()\n .map((facet) => {\n if (this.configuration.collectionSpecificFacetByOptions?.[collectionName]?.[facet]) {\n return `${facet}${this.configuration.collectionSpecificFacetByOptions[collectionName][facet]}`;\n } else if (this.configuration.facetByOptions[facet]) {\n return `${facet}${this.configuration.facetByOptions[facet]}`;\n } else {\n return facet;\n }\n })\n .join(\",\");\n }\n\n _buildSearchParameters(instantsearchRequest) {\n const params = instantsearchRequest.params;\n const indexName = instantsearchRequest.indexName;\n const adaptedCollectionName = this._adaptIndexName(indexName);\n\n // Convert all common parameters to snake case\n const snakeCasedAdditionalSearchParameters = {};\n for (const [key, value] of Object.entries(this.additionalSearchParameters)) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n\n // Override, collection specific parameters\n if (this.collectionSpecificSearchParameters[adaptedCollectionName]) {\n for (const [key, value] of Object.entries(this.collectionSpecificSearchParameters[adaptedCollectionName])) {\n snakeCasedAdditionalSearchParameters[this._camelToSnakeCase(key)] = value;\n }\n }\n\n const typesenseSearchParams = Object.assign({}, snakeCasedAdditionalSearchParameters);\n\n const adaptedSortBy = this._adaptSortBy(indexName);\n\n Object.assign(typesenseSearchParams, {\n collection: adaptedCollectionName,\n q: params.query === \"\" || params.query === undefined ? \"*\" : params.query,\n facet_by:\n snakeCasedAdditionalSearchParameters.facet_by || this._adaptFacetBy(params.facets, adaptedCollectionName),\n filter_by: this._adaptFilters(params, adaptedCollectionName) || snakeCasedAdditionalSearchParameters.filter_by,\n sort_by: adaptedSortBy || snakeCasedAdditionalSearchParameters.sort_by,\n max_facet_values: params.maxValuesPerFacet,\n page: (params.page || 0) + 1,\n });\n\n if (params.hitsPerPage) {\n typesenseSearchParams.per_page = params.hitsPerPage;\n }\n\n if (params.facetQuery) {\n typesenseSearchParams.facet_query = `${params.facetName}:${params.facetQuery}`;\n typesenseSearchParams.per_page = 0;\n }\n\n // If a custom vector query is specified, set q=*\n if (params.typesenseVectorQuery) {\n typesenseSearchParams.vector_query = params.typesenseVectorQuery;\n }\n\n // Allow for conditional disabling of overrides, for particular sort orders\n let sortByOption =\n this.configuration.collectionSpecificSortByOptions?.[adaptedCollectionName]?.[typesenseSearchParams[\"sort_by\"]] ||\n this.configuration.sortByOptions?.[typesenseSearchParams[\"sort_by\"]];\n if (sortByOption?.[\"enable_overrides\"] != null) {\n typesenseSearchParams[\"enable_overrides\"] = sortByOption[\"enable_overrides\"];\n }\n\n // console.log(params);\n // console.log(typesenseSearchParams);\n\n // Filter out empty or null values, so we don't accidentally override values set in presets\n // eslint-disable-next-line no-unused-vars\n return Object.fromEntries(Object.entries(typesenseSearchParams).filter(([_, v]) => v != null && v !== \"\"));\n }\n\n _camelToSnakeCase(str) {\n return str\n .split(/(?=[A-Z])/)\n .join(\"_\")\n .toLowerCase();\n }\n\n async request() {\n // console.log(this.instantsearchRequests);\n\n let searches = this.instantsearchRequests.map((instantsearchRequest) =>\n this._buildSearchParameters(instantsearchRequest),\n );\n\n // If this is a conversational search, then move conversation related params to query params\n let commonParams = {};\n if (searches[0]?.conversation === true || searches[0]?.conversation === \"true\") {\n const { q, conversation, conversation_id, conversation_model_id } = searches[0];\n commonParams = { q, conversation, conversation_id, conversation_model_id };\n\n searches = searches.map((searchParams) => {\n // eslint-disable-next-line no-unused-vars\n const { q, conversation, conversation_id, conversation_model_id, ...modifiedSearchParams } = searchParams;\n return modifiedSearchParams;\n });\n }\n\n return this.typesenseClient.multiSearch.perform({ searches: searches }, commonParams);\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,oBAAA;AAAA,IAAAC,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,yBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAA,IAAAQ,kBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAA,IAAAS,eAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAA,IAAAU,gBAAA,GAAAX,sBAAA,CAAAC,OAAA;AAAA,IAAAW,aAAA,GAAAZ,sBAAA,CAAAC,OAAA;AAAA,IAAAY,SAAA;AAAA,IAEAP,oBAAoB,GAAAF,OAAA,CAAAE,oBAAA;EAa/B,SAAAA,qBAAYQ,qBAAqB,EAAEC,eAAe,EAAEC,aAAa,EAAE;IAAA,IAAAL,gBAAA,mBAAAL,oBAAA;IACjE,IAAI,CAACQ,qBAAqB,GAAGA,qBAAqB;IAClD,IAAI,CAACC,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACC,0BAA0B,GAAGD,aAAa,CAACC,0BAA0B;IAC1E,IAAI,CAACC,kCAAkC,GAAGF,aAAa,CAACE,kCAAkC;EAC5F;EAAC,WAAAN,aAAA,aAAAN,oBAAA;IAAAa,GAAA;IAAAd,KAAA,EAED,SAAAe,6BAA6BC,SAAS,EAAEC,cAAc,EAAE;MAAA,IAAAC,qBAAA,EAAAC,qBAAA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