From 5a8ba6e91c293865564a847044155def8cde5901 Mon Sep 17 00:00:00 2001 From: Jason Bosco Date: Fri, 18 Oct 2024 17:37:35 -0500 Subject: [PATCH] Build --- dist/typesense-instantsearch-adapter.js | 1125 ++++++++++++----- dist/typesense-instantsearch-adapter.js.map | 2 +- dist/typesense-instantsearch-adapter.min.js | 2 +- ...typesense-instantsearch-adapter.min.js.map | 2 +- 4 files changed, 813 insertions(+), 318 deletions(-) diff --git a/dist/typesense-instantsearch-adapter.js b/dist/typesense-instantsearch-adapter.js index 892ac58..fabd473 100644 --- a/dist/typesense-instantsearch-adapter.js +++ b/dist/typesense-instantsearch-adapter.js @@ -5717,7 +5717,7 @@ try { /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -// Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors +// Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors function bind(fn, thisArg) { @@ -5933,6 +5933,8 @@ const isFormData = (thing) => { */ const isURLSearchParams = kindOfTest('URLSearchParams'); +const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); + /** * Trim excess whitespace off the beginning and end of a string * @@ -6321,8 +6323,7 @@ const toObjectSet = (arrayOrString, delimiter) => { const noop = () => {}; const toFiniteNumber = (value, defaultValue) => { - value = +value; - return Number.isFinite(value) ? value : defaultValue; + return value != null && Number.isFinite(value = +value) ? value : defaultValue; }; const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; @@ -6392,6 +6393,36 @@ const isAsyncFn = kindOfTest('AsyncFunction'); const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener("message", ({source, data}) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, false); + + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, "*"); + } + })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); +})( + typeof setImmediate === 'function', + isFunction(_global.postMessage) +); + +const asap = typeof queueMicrotask !== 'undefined' ? + queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); + +// ********************* + var utils$1 = { isArray, isArrayBuffer, @@ -6403,6 +6434,10 @@ var utils$1 = { isBoolean, isObject, isPlainObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, isUndefined, isDate, isFile, @@ -6443,7 +6478,9 @@ var utils$1 = { isSpecCompliantForm, toJSONObject, isAsyncFn, - isThenable + isThenable, + setImmediate: _setImmediate, + asap }; /** @@ -6471,7 +6508,10 @@ function AxiosError(message, code, config, request, response) { code && (this.code = code); config && (this.config = config); request && (this.request = request); - response && (this.response = response); + if (response) { + this.response = response; + this.status = response.status ? response.status : null; + } } utils$1.inherits(AxiosError, Error, { @@ -6491,7 +6531,7 @@ utils$1.inherits(AxiosError, Error, { // Axios config: utils$1.toJSONObject(this.config), code: this.code, - status: this.response && this.response.status ? this.response.status : null + status: this.status }; } }); @@ -6959,6 +6999,8 @@ var platform$1 = { const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; +const _navigator = typeof navigator === 'object' && navigator || undefined; + /** * Determine if we're running in a standard browser environment * @@ -6976,10 +7018,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde * * @returns {boolean} */ -const hasStandardBrowserEnv = ( - (product) => { - return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0 - })(typeof navigator !== 'undefined' && navigator.product); +const hasStandardBrowserEnv = hasBrowserEnv && + (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); /** * Determine if we're running in a standard browser webWorker environment @@ -6999,11 +7039,15 @@ const hasStandardBrowserWebWorkerEnv = (() => { ); })(); +const origin = hasBrowserEnv && window.location.href || 'http://localhost'; + var utils = /*#__PURE__*/Object.freeze({ __proto__: null, hasBrowserEnv: hasBrowserEnv, hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, - hasStandardBrowserEnv: hasStandardBrowserEnv + hasStandardBrowserEnv: hasStandardBrowserEnv, + navigator: _navigator, + origin: origin }); var platform = { @@ -7143,7 +7187,7 @@ const defaults = { transitional: transitionalDefaults, - adapter: ['xhr', 'http'], + adapter: ['xhr', 'http', 'fetch'], transformRequest: [function transformRequest(data, headers) { const contentType = headers.getContentType() || ''; @@ -7164,7 +7208,8 @@ const defaults = { utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || - utils$1.isBlob(data) + utils$1.isBlob(data) || + utils$1.isReadableStream(data) ) { return data; } @@ -7207,6 +7252,10 @@ const defaults = { const forcedJSONParsing = transitional && transitional.forcedJSONParsing; const JSONRequested = this.responseType === 'json'; + if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { + return data; + } + if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { const silentJSONParsing = transitional && transitional.silentJSONParsing; const strictJSONParsing = !silentJSONParsing && JSONRequested; @@ -7410,6 +7459,10 @@ class AxiosHeaders { setHeaders(header, valueOrRewrite); } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { setHeaders(parseHeaders(header), valueOrRewrite); + } else if (utils$1.isHeaders(header)) { + for (const [key, value] of header.entries()) { + setHeader(value, key, rewrite); + } } else { header != null && setHeader(valueOrRewrite, header, rewrite); } @@ -7677,96 +7730,153 @@ function settle(resolve, reject, response) { } } -var cookies = platform.hasStandardBrowserEnv ? +function parseProtocol(url) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); + return match && match[1] || ''; +} - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; +/** + * 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; - utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); + min = min !== undefined ? min : 1000; - utils$1.isString(path) && cookie.push('path=' + path); + return function push(chunkLength) { + const now = Date.now(); - utils$1.isString(domain) && cookie.push('domain=' + domain); + const startedAt = timestamps[tail]; - secure === true && cookie.push('secure'); + if (!firstSampleTS) { + firstSampleTS = now; + } - document.cookie = cookie.join('; '); - }, + bytes[head] = chunkLength; + timestamps[head] = now; - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, + let i = tail; + let bytesCount = 0; - remove(name) { - this.write(name, '', Date.now() - 86400000); + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; } - } - : + head = (head + 1) % samplesCount; - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } -/** - * 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); -} + if (now - firstSampleTS < min) { + return; + } -/** - * 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; + const passed = startedAt && now - startedAt; + + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; + }; } /** - * 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 + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Function} */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn.apply(null, args); + }; + + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if ( passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + + const flush = () => lastArgs && invoke(lastArgs); + + return [throttled, flush]; } +const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + + return throttle(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, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true + }; + + listener(data); + }, freq); +}; + +const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + + return [(loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), throttled[1]]; +}; + +const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args)); + var isURLSameOrigin = platform.hasStandardBrowserEnv ? // 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 msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent); const urlParsingNode = document.createElement('a'); let originURL; @@ -7824,137 +7934,267 @@ var isURLSameOrigin = platform.hasStandardBrowserEnv ? }; })(); -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} +var cookies = platform.hasStandardBrowserEnv ? -/** - * 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; + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + '=' + encodeURIComponent(value)]; - min = min !== undefined ? min : 1000; + utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - return function push(chunkLength) { - const now = Date.now(); + utils$1.isString(path) && cookie.push('path=' + path); - const startedAt = timestamps[tail]; + utils$1.isString(domain) && cookie.push('domain=' + domain); - if (!firstSampleTS) { - firstSampleTS = now; - } + secure === true && cookie.push('secure'); - bytes[head] = chunkLength; - timestamps[head] = now; + document.cookie = cookie.join('; '); + }, - let i = tail; - let bytesCount = 0; + read(name) { + const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; + remove(name) { + this.write(name, '', Date.now() - 86400000); } + } - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } + : - if (now - firstSampleTS < min) { - return; - } + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + remove() {} + }; - const passed = startedAt && now - startedAt; +/** + * 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); +} - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; +/** + * 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; } -function progressEventReducer(listener, isDownloadStream) { - let bytesNotified = 0; - const _speedometer = speedometer(50, 250); +/** + * 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; +} - 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; +const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing; - bytesNotified = loaded; +/** + * 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 = {}; - 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 - }; + 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; + } - data[isDownloadStream ? 'download' : 'upload'] = true; + // 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); + } + } - listener(data); + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } + } + + // 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); + } + } + + // 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); + } + } + + 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 isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; +var resolveConfig = (config) => { + const newConfig = mergeConfig({}, config); -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); - } + let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - if (config.signal) { - config.signal.removeEventListener('abort', onCanceled); - } + newConfig.headers = headers = AxiosHeaders$1.from(headers); + + newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); + + // HTTP basic authentication + if (auth) { + headers.set('Authorization', 'Basic ' + + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) + ); + } + + let contentType; + + if (utils$1.isFormData(data)) { + if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { + headers.setContentType(undefined); // Let the browser set it + } else if ((contentType = headers.getContentType()) !== false) { + // fix semicolon duplication issue for ReactNative FormData implementation + const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; + headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); } + } - let contentType; + // 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$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('; ')); + if (platform.hasStandardBrowserEnv) { + withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); + + if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) { + // Add xsrf header + const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName); + + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); } } + } - let request = new XMLHttpRequest(); + return newConfig; +}; + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - // 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 xhrAdapter = isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig(config); + let requestData = _config.data; + const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); + let {responseType, onUploadProgress, onDownloadProgress} = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + + function done() { + flushUpload && flushUpload(); // flush events + flushDownload && flushDownload(); // flush events + + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + + _config.signal && _config.signal.removeEventListener('abort', onCanceled); } - const fullPath = buildFullPath(config.baseURL, config.url); + let request = new XMLHttpRequest(); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + request.open(_config.method.toUpperCase(), _config.url, true); // Set the request timeout in MS - request.timeout = config.timeout; + request.timeout = _config.timeout; function onloadend() { if (!request) { @@ -8034,10 +8274,10 @@ var xhrAdapter = isXHRAdapterSupported && function (config) { // 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; + 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, @@ -8049,22 +8289,6 @@ var xhrAdapter = isXHRAdapterSupported && function (config) { 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(platform.hasStandardBrowserEnv) { - withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config)); - - if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) { - // Add xsrf header - const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName); - - if (xsrfValue) { - requestHeaders.set(config.xsrfHeaderName, xsrfValue); - } - } - } - // Remove Content-Type if data is undefined requestData === undefined && requestHeaders.setContentType(null); @@ -8076,26 +8300,31 @@ var xhrAdapter = isXHRAdapterSupported && function (config) { } // Add withCredentials to request if needed - if (!utils$1.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; + if (!utils$1.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; } // Add responseType to request if needed if (responseType && responseType !== 'json') { - request.responseType = config.responseType; + request.responseType = _config.responseType; } // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true)); + if (onDownloadProgress) { + ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true)); + request.addEventListener('progress', downloadThrottled); } // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress)); + if (onUploadProgress && request.upload) { + ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress)); + + request.upload.addEventListener('progress', uploadThrottled); + + request.upload.addEventListener('loadend', flushUpload); } - if (config.cancelToken || config.signal) { + if (_config.cancelToken || _config.signal) { // Handle cancellation // eslint-disable-next-line func-names onCanceled = cancel => { @@ -8107,13 +8336,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) { request = null; }; - config.cancelToken && config.cancelToken.subscribe(onCanceled); - if (config.signal) { - config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); } } - const protocol = parseProtocol(fullPath); + const protocol = parseProtocol(_config.url); if (protocol && platform.protocols.indexOf(protocol) === -1) { reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); @@ -8126,9 +8355,360 @@ var xhrAdapter = isXHRAdapterSupported && function (config) { }); }; +const composeSignals = (signals, timeout) => { + const {length} = (signals = signals ? signals.filter(Boolean) : []); + + if (timeout || length) { + let controller = new AbortController(); + + let aborted; + + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); + } + }; + + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT)); + }, timeout); + + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach(signal => { + signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); + }); + signals = null; + } + }; + + signals.forEach((signal) => signal.addEventListener('abort', onabort)); + + const {signal} = controller; + + signal.unsubscribe = () => utils$1.asap(unsubscribe); + + return signal; + } +}; + +var composeSignals$1 = composeSignals; + +const streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + + let pos = 0; + let end; + + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}; + +const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; + +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + + const reader = stream.getReader(); + try { + for (;;) { + const {done, value} = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } +}; + +const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); + + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + + return new ReadableStream({ + async pull(controller) { + try { + const {done, value} = await iterator.next(); + + if (done) { + _onFinish(); + controller.close(); + return; + } + + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + } + }, { + highWaterMark: 2 + }) +}; + +const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; +const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; + +// used only inside the fetch adapter +const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? + ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : + async (str) => new Uint8Array(await new Response(str).arrayBuffer()) +); + +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false + } +}; + +const supportsRequestStream = isReadableStreamSupported && test(() => { + let duplexAccessed = false; + + const hasContentType = new Request(platform.origin, { + body: new ReadableStream(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + }, + }).headers.has('Content-Type'); + + return duplexAccessed && !hasContentType; +}); + +const DEFAULT_CHUNK_SIZE = 64 * 1024; + +const supportsResponseStream = isReadableStreamSupported && + test(() => utils$1.isReadableStream(new Response('').body)); + + +const resolvers = { + stream: supportsResponseStream && ((res) => res.body) +}; + +isFetchSupported && (((res) => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { + !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() : + (_, config) => { + throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); + }); + }); +})(new Response)); + +const getBodyLength = async (body) => { + if (body == null) { + return 0; + } + + if(utils$1.isBlob(body)) { + return body.size; + } + + if(utils$1.isSpecCompliantForm(body)) { + const _request = new Request(platform.origin, { + method: 'POST', + body, + }); + return (await _request.arrayBuffer()).byteLength; + } + + if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { + return body.byteLength; + } + + if(utils$1.isURLSearchParams(body)) { + body = body + ''; + } + + if(utils$1.isString(body)) { + return (await encodeText(body)).byteLength; + } +}; + +const resolveBodyLength = async (headers, body) => { + const length = utils$1.toFiniteNumber(headers.getContentLength()); + + return length == null ? getBodyLength(body) : length; +}; + +var fetchAdapter = isFetchSupported && (async (config) => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions + } = resolveConfig(config); + + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + + let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + + let request; + + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + + let requestContentLength; + + try { + if ( + onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && + (requestContentLength = await resolveBodyLength(headers, data)) !== 0 + ) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: "half" + }); + + let contentTypeHeader; + + if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { + headers.setContentType(contentTypeHeader); + } + + if (_request.body) { + const [onProgress, flush] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); + } + } + + if (!utils$1.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = "credentials" in Request.prototype; + request = new Request(url, { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : undefined + }); + + let response = await fetch(request); + + const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + + if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { + const options = {}; + + ['status', 'statusText', 'headers'].forEach(prop => { + options[prop] = response[prop]; + }); + + const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); + + const [onProgress, flush] = onDownloadProgress && progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + ) || []; + + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + + responseType = responseType || 'text'; + + let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); + + !isStreamResponse && unsubscribe && unsubscribe(); + + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders$1.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request + }); + }) + } catch (err) { + unsubscribe && unsubscribe(); + + if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), + { + cause: err.cause || err + } + ) + } + + throw AxiosError.from(err, err && err.code, config, request); + } +}); + const knownAdapters = { http: httpAdapter, - xhr: xhrAdapter + xhr: xhrAdapter, + fetch: fetchAdapter }; utils$1.forEach(knownAdapters, (fn, value) => { @@ -8272,109 +8852,7 @@ function dispatchRequest(config) { }); } -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; - } - - // 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); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // 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); - } - } - - // 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); - } - } - - 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 VERSION = "1.7.7"; const validators$1 = {}; @@ -8500,12 +8978,15 @@ class Axios { // 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; + try { + 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; + } + } catch (e) { + // ignore the case where "stack" is an un-writable property } } @@ -8778,6 +9259,20 @@ class CancelToken { } } + toAbortSignal() { + const controller = new AbortController(); + + const abort = (err) => { + controller.abort(err); + }; + + this.subscribe(abort); + + controller.signal.unsubscribe = () => this.unsubscribe(abort); + + return controller.signal; + } + /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. diff --git a/dist/typesense-instantsearch-adapter.js.map b/dist/typesense-instantsearch-adapter.js.map index d175946..c296119 100644 --- a/dist/typesense-instantsearch-adapter.js.map +++ b/d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BAAgB,IAAI,SAAS,CAAC;EACvE,CAAC;EACDoR,mBAAmB,WAAAA,oBAAA,EAAG;IACpB,IAAMzO,MAAM,GAAG,IAAI,CAAC1D,iBAAiB,CAAC2N,KAAK,GAAG,IAAI,CAAC3N,iBAAiB,CAACoS,cAAc,CAACxI,QAAQ;IAC5F,IAAIzE,MAAM,CAACqN,QAAQ,CAAC9O,MAAM,CAAC,EAAE;MAC3B,OAAO+O,IAAI,CAACC,IAAI,CAAChP,MAAM,CAAC;IAC1B,CAAC,MAAM;MACL,OAAO,CAAC;IACV;EACF;AACF,CAAC;;;;;;;;;;ACdD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAA0C;AAClD,QAAQ,oCAAO,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;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;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;ACxSY;AACb;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;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,GAAG,oBAAoB,GAAG,cAAc;AACtD,+BAA+B,mBAAO,CAAC,4EAAoB;AAC3D,cAAc;AACd,qCAAqC,mBAAO,CAAC,wFAA0B;AACvE,oBAAoB;AACpB,0BAA0B,mBAAO,CAAC,kFAAoB;AACtD,cAAc;AACd,kBAAe,KAAK;AACpB;;;;;;;;;;;ACpCa;AACb;AACA,4BAA4B,+DAA+D,iBA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ACrB,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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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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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AC7D;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;;;;;;;;;;;ACvEa;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,2CAA2C,mBAAO,CAAC,0FAAsB;AACzE,0CAA0C,mBAAO,CAAC,wFAAqB;AACvE;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,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ea;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,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ACA;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,mB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,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,4BA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Aa;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;;;;;;;;;;;;;;;;;;;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,sDAAO;AAC5B;;;;;;;;;;;;;;;ACLe;AACf;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACRqD;AACtC;AACf;AACA,oCAAoC,gEAAgB;AACpD;AACA;AACA;AACA,sFAAsF,gEAAgB;AACtG;;;;;;UCRA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;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AAMqQ,eAAe,CAACtQ,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAACsQ,eAAe,CAAClG,IAAI,IAAI,CAACkG,eAAe,CAAC1B,YAAY,EAAE;QAC1D,MAAM,IAAInS,KAAK,2BAAAwD,MAAA,CAA2BqQ,eAAe,CAACiB,IAAI,SAAAtR,MAAA,CAAMqQ,eAAe,CAACtQ,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|/home/fanis/code/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 }\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 _adaptRulesContextsToOverrideTags(ruleContexts) {\n return ruleContexts.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 (params.ruleContexts && params.ruleContexts.length > 0) {\n typesenseSearchParams.override_tags = this._adaptRulesContextsToOverrideTags(params.ruleContexts);\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 _adaptUserData(metadata) {\n if (!metadata) return [];\n\n return Array.isArray(metadata) ? metadata : [metadata];\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 // Add appliedRules if metadata is present\n if (this.typesenseResponse.metadata) {\n adaptedResult.appliedRules = [\"typesense-override\"];\n adaptedResult.userData = this._adaptUserData(this.typesenseResponse.metadata);\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","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$","_adaptRulesContextsToOverrideTags","ruleContexts","_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","override_tags","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","_adaptUserData","metadata","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","appliedRules","userData","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;MAAAC,sBAAA;MAAAC,sBAAA;MAAAC,sBAAA;IAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAAAzB,iFAAA,OAAAE,aAAA;IACtB,IAAI,CAAC0B,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,GAAI,CAAC,GAAG,EAAE;I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;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;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;ACxSY;AACb;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;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,GAAG,oBAAoB,GAAG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ACA;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;;;;;;;;;;;ACvEa;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,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;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D;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,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC1Ea;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oC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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,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;;;;;;;;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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;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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;;;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;;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;;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;;AAEA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,aAAa;AACvD;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,GAAG,WAAW,cAAc;AAC5B,CAAC;AACD;AACA;AACA;;AAEA;AACA;;AAEA;;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;;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;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;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;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;;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;AACA;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;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,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;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;;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,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;AACA,kCAAkC;;AAElC,OAAO,oEAAoE;;AAE3E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,yCAAyC;AACzC,MAAM;AACN;AACA,kEAAkE;AAClE,gFAAgF;AAChF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,oDAAoD;AAC7D;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC,wCAAwC;;AAExC;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;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,SAAS,QAAQ;;AAEjB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,SAAS;AACjD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA,WAAW,QAAQ;;AAEnB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,aAAa;;AAE5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA,CAAC;;AAED;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD,OAAO;AACP,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;;AAEA;;AAEA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;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;;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;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;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;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;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;;;;;;;;;;;;;;;;ACxqHe;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;;;;;;;;;;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B,IAAI,CAACyC,eAAe,GAAG,IAAI4Q,mDAAqB,CAAC,IAAI,CAAC3Q,aAAa,CAACjF,MAAM,CAAC;MAC3E,OAAO,IAAI;IACb;EAAC;IAAA6B,GAAA;IAAAS,KAAA,EAED,SAAAqU,yBAAyBD,eAAe,EAAE;MACxC,IAAIA,eAAe,CAACtQ,KAAK,EAAE;QACzB,MAAM,IAAIvD,KAAK,IAAAwD,MAAA,CAAIqQ,eAAe,CAACiB,IAAI,SAAAtR,MAAA,CAAMqQ,eAAe,CAACtQ,KAAK,CAAE,CAAC;MACvE;MACA,IAAI,CAACsQ,eAAe,CAAClG,IAAI,IAAI,CAACkG,eAAe,CAAC1B,YAAY,EAAE;QAC1D,MAAM,IAAInS,KAAK,2BAAAwD,MAAA,CAA2BqQ,eAAe,CAACiB,IAAI,SAAAtR,MAAA,CAAMqQ,eAAe,CAACtQ,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/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/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 }\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 _adaptRulesContextsToOverrideTags(ruleContexts) {\n return ruleContexts.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 (params.ruleContexts && params.ruleContexts.length > 0) {\n typesenseSearchParams.override_tags = this._adaptRulesContextsToOverrideTags(params.ruleContexts);\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 _adaptUserData(metadata) {\n if (!metadata) return [];\n\n return Array.isArray(metadata) ? metadata : [metadata];\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 // Add appliedRules if metadata is present\n if (this.typesenseResponse.metadata) {\n adaptedResult.appliedRules = [\"typesense-override\"];\n adaptedResult.userData = this._adaptUserData(this.typesenseResponse.metadata);\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.7.7 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\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\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 return value != null && Number.isFinite(value = +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\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\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 isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\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 setImmediate: _setImmediate,\n asap\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 if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\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.status\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\nconst _navigator = typeof navigator === 'object' && navigator || 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 = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\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\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv,\n navigator: _navigator,\n origin: origin\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', 'fetch'],\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 utils$1.isReadableStream(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 (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {\n return data;\n }\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 if (utils$1.isHeaders(header)) {\n for (const [key, value] of header.entries()) {\n setHeader(value, key, rewrite);\n }\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\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\n/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nconst progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(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 lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n};\n\nconst progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n};\n\nconst asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));\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 = platform.navigator && /(msie|trident)/i.test(platform.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\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\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\nvar resolveConfig = (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders$1.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils$1.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.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 headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\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\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, 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 // 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 (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\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(_config.url);\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 composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n };\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils$1.asap(unsubscribe);\n\n return signal;\n }\n};\n\nvar composeSignals$1 = composeSignals;\n\nconst streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nconst readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nconst trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n};\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n};\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils$1.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n });\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils$1.isBlob(body)) {\n return body.size;\n }\n\n if(utils$1.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils$1.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils$1.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n};\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils$1.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n};\n\nvar fetchAdapter = isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils$1.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders$1.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n });\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\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 VERSION = \"1.7.7\";\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 try {\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 } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\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 toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\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","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$","_adaptRulesContextsToOverrideTags","ruleContexts","_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","override_tags","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","_adaptUserData","metadata","adaptedRenderingContent","grouped_hits","nbHits","nbPages","_adaptNumberOfPages","request_params","facets_stats","appliedRules","userData","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 5a2f7d5..49ca52e 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=this,S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.server=S.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=S.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=S.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=S.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=S.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=O.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:O.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=S.renderingContent,this.flattenGroupedHits=null===(y=S.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=S.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(b=S.filterByOptions)&&void 0!==b?b:{},this.sortByOptions=null!==(g=S.sortByOptions)&&void 0!==g?g:{},this.collectionSpecificFacetByOptions=null!==(m=S.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(w=S.collectionSpecificFilterByOptions)&&void 0!==w?w:{},this.collectionSpecificSortByOptions=null!==(_=S.collectionSpecificSortByOptions)&&void 0!==_?_:{}}),[{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][">="]?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:"_adaptRulesContextsToOverrideTags",value:function(t){return 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);s0&&(g.override_tags=this._adaptRulesContextsToOverrideTags(r.ruleContexts)),r.typesenseVectorQuery&&(g.vector_query=r.typesenseVectorQuery);var w=(null===(e=this.configuration.collectionSpecificSortByOptions)||void 0===e||null===(e=e[i])||void 0===e?void 0:e[g.sort_by])||(null===(n=this.configuration.sortByOptions)||void 0===n?void 0:n[g.sort_by]);return null!=(null==w?void 0:w.enable_overrides)&&(g.enable_overrides=w.enable_overrides),Object.fromEntries(Object.entries(g).filter((function(t){var e=v(t,2),n=(e[0],e[1]);return null!=n&&""!==n})))}},{key:"_camelToSnakeCase",value:function(t){return t.split(/(?=[A-Z])/).join("_").toLowerCase()}},{key:"request",value:(t=e(l().mark((function t(){var e,n,r,o,i,a,s,u,c,f=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.instantsearchRequests.map((function(t){return f._buildSearchParameters(t)})),o={},!0!==(null===(e=r[0])||void 0===e?void 0:e.conversation)&&"true"!==(null===(n=r[0])||void 0===n?void 0:n.conversation)||(i=r[0],a=i.q,s=i.conversation,u=i.conversation_id,c=i.conversation_model_id,o={q:a,conversation:s,conversation_id:u,conversation_model_id:c},r=r.map((function(t){return t.q,t.conversation,t.conversation_id,t.conversation_model_id,p(t,b)}))),t.abrupt("return",this.typesenseClient.multiSearch.perform({searches:r},o));case 4:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}],[{key:"INDEX_NAME_MATCHING_REGEX",get:function(){return new RegExp("^(.+?)(?=(/sort/(.*))|$)")}},{key:"DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX",get:function(){return new RegExp("(.*)((?!:).):(?!:)(.*)")}},{key:"DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX",get:function(){return new RegExp("(.*?)(<=|>=|>|<|=)(.*)")}}]);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:"_adaptUserData",value:function(t){return t?Array.isArray(t)?t:[t]:[]}},{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.typesenseResponse.metadata&&(e.appliedRules=["typesense-override"],e.userData=this._adaptUserData(this.typesenseResponse.metadata)),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:T(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 T(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=j(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 j(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,j(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"),[S,P,E,C]=["ReadableStream","Request","Response","Headers"].map(u);function x(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 T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,j=t=>!f(t)&&t!==T,k=(A="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>A&&t instanceof A);var A;const N=u("HTMLFormElement"),F=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),M=u("RegExp"),q=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};x(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},L="abcdefghijklmnopqrstuvwxyz",U="0123456789",D={DIGIT:U,ALPHA:L,ALPHA_DIGIT:L+L.toUpperCase()+U},H=u("AsyncFunction"),I=(B="function"==typeof setImmediate,G=d(T.postMessage),B?setImmediate:G?(V=`axios@${Math.random()}`,W=[],T.addEventListener("message",(({source:t,data:e})=>{t===T&&e===V&&W.length&&W.shift()()}),!1),t=>{W.push(t),T.postMessage(V,"*")}):t=>setTimeout(t));var B,G,V,W;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):"undefined"!=typeof process&&process.nextTick||I;var z={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,isReadableStream:S,isRequest:P,isResponse:E,isHeaders:C,isUndefined:f,isDate:g,isFile:m,isBlob:w,isRegExp:M,isFunction:d,isStream:t=>v(t)&&d(t.pipe),isURLSearchParams:O,isTypedArray:k,isFileList:_,forEach:x,merge:function t(){const{caseless:e}=j(this)&&this||{},n={},r=(r,o)=>{const i=e&&R(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(x(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:N,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:q,freezeMethods:t=>{q(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)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:R,global:T,isContextDefined:j,ALPHABET:D,generateString:(t=16,e=D.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 x(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:H,isThenable:t=>t&&(v(t)||d(t))&&d(t.then)&&d(t.catch),setImmediate:I,asap:K};function J(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,this.status=o.status?o.status:null)}z.inherits(J,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:z.toJSONObject(this.config),code:this.code,status:this.status}}});const $=J.prototype,Q={};function X(t){return z.isPlainObject(t)||z.isArray(t)}function Y(t){return z.endsWith(t,"[]")?t.slice(0,-2):t}function Z(t,e,n){return t?t.concat(e).map((function(t,e){return t=Y(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=>{Q[t]={value:t}})),Object.defineProperties(J,Q),Object.defineProperty($,"isAxiosError",{value:!0}),J.from=(t,e,n,r,o,i)=>{const a=Object.create($);return z.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),J.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const tt=z.toFlatObject(z,{},null,(function(t){return/^is[A-Z]/.test(t)}));function et(t,e,n){if(!z.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!z.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&z.isSpecCompliantForm(e);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(z.isDate(t))return t.toISOString();if(!s&&z.isBlob(t))throw new J("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(t)||z.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(z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(z.isArray(t)&&function(t){return z.isArray(t)&&!t.some(X)}(t)||(z.isFileList(t)||z.endsWith(n,"[]"))&&(s=z.toArray(t)))return n=Y(n),s.forEach((function(t,r){!z.isUndefined(t)&&null!==t&&e.append(!0===a?Z([n],r,i):null===a?n:n+"[]",u(t))})),!1;return!!X(t)||(e.append(Z(o,n,i),u(t)),!1)}const l=[],f=Object.assign(tt,{defaultVisitor:c,convertValue:u,isVisitable:X});if(!z.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!z.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),z.forEach(n,(function(n,i){!0===(!(z.isUndefined(n)||null===n)&&o.call(e,n,z.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function rt(t,e){this._pairs=[],t&&et(t,this,e)}const ot=rt.prototype;function it(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function at(t,e,n){if(!e)return t;const r=n&&n.encode||it,o=n&&n.serialize;let i;if(i=o?o(e,n):z.isURLSearchParams(e)?e.toString():new rt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}ot.append=function(t,e){this._pairs.push([t,e])},ot.toString=function(t){const e=t?function(e){return t.call(this,e,nt)}:nt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var st=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){z.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ct={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:rt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const lt="undefined"!=typeof window&&"undefined"!=typeof document,ft="object"==typeof navigator&&navigator||void 0,ht=lt&&(!ft||["ReactNative","NativeScript","NS"].indexOf(ft.product)<0),pt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,dt=lt&&window.location.href||"http://localhost";var yt={...Object.freeze({__proto__:null,hasBrowserEnv:lt,hasStandardBrowserWebWorkerEnv:pt,hasStandardBrowserEnv:ht,navigator:ft,origin:dt}),...ct};function vt(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&&z.isArray(r)?r.length:i,s?(z.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&z.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&z.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 z.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const bt={transitional:ut,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=z.isObject(t);if(o&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return r?JSON.stringify(vt(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.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 et(t,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return yt.isNode&&z.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return et(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(z.isString(t))try{return(0,JSON.parse)(t),z.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||bt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.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 J.from(t,J.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:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],(t=>{bt.headers[t]={}}));var gt=bt;const mt=z.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"]),wt=Symbol("internals");function _t(t){return t&&String(t).trim().toLowerCase()}function Ot(t){return!1===t||null==t?t:z.isArray(t)?t.map(Ot):String(t)}function St(t,e,n,r,o){return z.isFunction(r)?r.call(this,e,n):(o&&(e=n),z.isString(e)?z.isString(r)?-1!==e.indexOf(r):z.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=_t(e);if(!o)throw new Error("header name must be a non-empty string");const i=z.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Ot(t))}const i=(t,e)=>z.forEach(t,((t,n)=>o(t,n,e)));if(z.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(z.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]&&mt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(z.isHeaders(t))for(const[e,r]of t.entries())o(r,e,n);else null!=t&&o(e,t,n);return this}get(t,e){if(t=_t(t)){const n=z.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(z.isFunction(e))return e.call(this,t,n);if(z.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=_t(t)){const n=z.findKey(this,t);return!(!n||void 0===this[n]||e&&!St(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=_t(t)){const o=z.findKey(n,t);!o||e&&!St(0,n[o],o,e)||(delete n[o],r=!0)}}return z.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&&!St(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return z.forEach(this,((r,o)=>{const i=z.findKey(n,o);if(i)return e[i]=Ot(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]=Ot(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return z.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&z.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[wt]=this[wt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=_t(t);e[r]||(function(t,e){const n=z.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 z.isArray(t)?t.forEach(r):r(t),this}}Pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(Pt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),z.freezeMethods(Pt);var Et=Pt;function Ct(t,e){const n=this||gt,r=e||n,o=Et.from(r.headers);let i=r.data;return z.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function Rt(t,e,n){J.call(this,null==t?"canceled":t,J.ERR_CANCELED,e,n),this.name="CanceledError"}function Tt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}z.inherits(Rt,J,{__CANCEL__:!0});const jt=(t,e,n=3)=>{let r=0;const o=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{o=i,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),s=e-o;s>=i?a(t,e):(n=t,r||(r=setTimeout((()=>{r=null,a(n)}),i-s)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,u=o(s);r=i,t({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:n,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),n)},kt=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},At=t=>(...e)=>z.asap((()=>t(...e)));var Nt=yt.hasStandardBrowserEnv?function(){const t=yt.navigator&&/(msie|trident)/i.test(yt.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=z.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Ft=yt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];z.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),z.isString(r)&&a.push("path="+r),z.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}const qt=t=>t instanceof Et?{...t}:t;function Lt(t,e){e=e||{};const n={};function r(t,e,n){return z.isPlainObject(t)&&z.isPlainObject(e)?z.merge.call({caseless:n},t,e):z.isPlainObject(e)?z.merge({},e):z.isArray(e)?e.slice():e}function o(t,e,n){return z.isUndefined(e)?z.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!z.isUndefined(e))return r(void 0,e)}function a(t,e){return z.isUndefined(e)?z.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(qt(t),qt(e),!0)};return z.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=u[r]||o,a=i(t[r],e[r],r);z.isUndefined(a)&&i!==s||(n[r]=a)})),n}var Ut=t=>{const e=Lt({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:u}=e;if(e.headers=s=Et.from(s),e.url=at(Mt(e.baseURL,e.url),t.params,t.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),z.isFormData(r))if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];s.setContentType([t||"multipart/form-data",...e].join("; "))}if(yt.hasStandardBrowserEnv&&(o&&z.isFunction(o)&&(o=o(e)),o||!1!==o&&Nt(e.url))){const t=i&&a&&Ft.read(a);t&&s.set(i,t)}return e},Dt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Ut(t);let o=r.data;const i=Et.from(r.headers).normalize();let a,s,u,c,l,{responseType:f,onUploadProgress:h,onDownloadProgress:p}=r;function d(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function v(){if(!y)return;const r=Et.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Tt((function(t){e(t),d()}),(function(t){n(t),d()}),{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(v)},y.onabort=function(){y&&(n(new J("Request aborted",J.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new J("Network Error",J.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ut;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new J(e,o.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&z.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),z.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),f&&"json"!==f&&(y.responseType=r.responseType),p&&([u,l]=jt(p,!0),y.addEventListener("progress",u)),h&&y.upload&&([s,c]=jt(h),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new Rt(null,t,y):e),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const b=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);b&&-1===yt.protocols.indexOf(b)?n(new J("Unsupported protocol "+b+":",J.ERR_BAD_REQUEST,t)):y.send(o||null)}))},Ht=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const o=function(t){if(!n){n=!0,a();const e=t instanceof Error?t:this.reason;r.abort(e instanceof J?e:new Rt(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new J(`timeout ${e} of ms exceeded`,J.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>z.asap(a),s}};const It=function*(t,e){let n=t.byteLength;if(!e||n{const o=async function*(t,e){for await(const n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*It(n,e)}(t,e);let i,a=0,s=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return s(),void t.close();let i=r.byteLength;if(n){let t=a+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:t=>(s(t),o.return())},{highWaterMark:2})},Gt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Vt=Gt&&"function"==typeof ReadableStream,Wt=Gt&&("function"==typeof TextEncoder?(Kt=new TextEncoder,t=>Kt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Kt;const zt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},Jt=Vt&&zt((()=>{let t=!1;const e=new Request(yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),$t=Vt&&zt((()=>z.isReadableStream(new Response("").body))),Qt={stream:$t&&(t=>t.body)};var Xt;Gt&&(Xt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Qt[t]&&(Qt[t]=z.isFunction(Xt[t])?e=>e[t]():(e,n)=>{throw new J(`Response type '${t}' is not supported`,J.ERR_NOT_SUPPORT,n)})})));const Yt={http:null,xhr:Dt,fetch:Gt&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:l,withCredentials:f="same-origin",fetchOptions:h}=Ut(t);c=c?(c+"").toLowerCase():"text";let p,d=Ht([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let v;try{if(u&&Jt&&"get"!==n&&"head"!==n&&0!==(v=await(async(t,e)=>{const n=z.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(z.isBlob(t))return t.size;if(z.isSpecCompliantForm(t)){const e=new Request(yt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return z.isArrayBufferView(t)||z.isArrayBuffer(t)?t.byteLength:(z.isURLSearchParams(t)&&(t+=""),z.isString(t)?(await Wt(t)).byteLength:void 0)})(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(z.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=kt(v,jt(At(u)));r=Bt(n.body,65536,t,e)}}z.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(e,{...h,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let i=await fetch(p);const a=$t&&("stream"===c||"response"===c);if($t&&(s||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=z.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&kt(e,jt(At(s),!0))||[];i=new Response(Bt(i.body,65536,n,(()=>{r&&r(),y&&y()})),t)}c=c||"text";let b=await Qt[z.findKey(Qt,c)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,n)=>{Tt(e,n,{data:b,headers:Et.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:p})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,t,p),{cause:e.cause||e});throw J.from(e,e&&e.code,t,p)}})};z.forEach(Yt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Zt=t=>`- ${t}`,te=t=>z.isFunction(t)||null===t||!1===t;var ee=t=>{t=z.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 J("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Zt).join("\n"):" "+Zt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function ne(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Rt(null,t)}function re(t){return ne(t),t.headers=Et.from(t.headers),t.data=Ct.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ee(t.adapter||gt.adapter)(t).then((function(e){return ne(t),e.data=Ct.call(t,t.transformResponse,e),e.headers=Et.from(e.headers),e}),(function(e){return xt(e)||(ne(t),e&&e.response&&(e.response.data=Ct.call(t,t.transformResponse,e.response),e.response.headers=Et.from(e.response.headers))),Promise.reject(e)}))}const oe={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{oe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const ie={};oe.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new J(r(o," has been removed"+(e?" in "+e:"")),J.ERR_DEPRECATED);return e&&!ie[o]&&(ie[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 ae={assertOptions:function(t,e,n){if("object"!=typeof t)throw new J("options must be an object",J.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 J("option "+i+" must be "+n,J.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}},validators:oe};const se=ae.validators;class ue{constructor(t){this.defaults=t,this.interceptors={request:new st,response:new st}}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/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Lt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&ae.assertOptions(n,{silentJSONParsing:se.transitional(se.boolean),forcedJSONParsing:se.transitional(se.boolean),clarifyTimeoutError:se.transitional(se.boolean)},!1),null!=r&&(z.isFunction(r)?e.paramsSerializer={serialize:r}:ae.assertOptions(r,{encode:se.function,serialize:se.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&z.merge(o.common,o[e.method]);o&&z.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Et.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=[re.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 Rt(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)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new le((function(e){t=e})),cancel:t}}}var fe=le;const he={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(he).forEach((([t,e])=>{he[e]=t}));var pe=he;const de=function t(e){const n=new ce(e),o=r(ce.prototype.request,n);return z.extend(o,ce.prototype,n,{allOwnKeys:!0}),z.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(Lt(e,n))},o}(gt);de.Axios=ce,de.CanceledError=Rt,de.CancelToken=fe,de.isCancel=xt,de.VERSION="1.7.7",de.toFormData=et,de.AxiosError=J,de.Cancel=de.CanceledError,de.all=function(t){return Promise.all(t)},de.spread=function(t){return function(e){return t.apply(null,e)}},de.isAxiosError=function(t){return z.isObject(t)&&!0===t.isAxiosError},de.mergeConfig=Lt,de.AxiosHeaders=Et,de.formToJSON=t=>vt(z.isHTMLForm(t)?new FormData(t):t),de.getAdapter=ee,de.HttpStatusCode=pe,de.default=de,t.exports=de}},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=this,S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.server=S.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=S.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=S.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(p=S.facetableFieldsWithSpecialCharacters)&&void 0!==p?p:[],this.collectionSpecificSearchParameters=null!==(d=S.collectionSpecificSearchParameters)&&void 0!==d?d:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(t){var e,n,r,o,i,a,s=O.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:O.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=S.renderingContent,this.flattenGroupedHits=null===(y=S.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=S.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(b=S.filterByOptions)&&void 0!==b?b:{},this.sortByOptions=null!==(g=S.sortByOptions)&&void 0!==g?g:{},this.collectionSpecificFacetByOptions=null!==(m=S.collectionSpecificFacetByOptions)&&void 0!==m?m:{},this.collectionSpecificFilterByOptions=null!==(w=S.collectionSpecificFilterByOptions)&&void 0!==w?w:{},this.collectionSpecificSortByOptions=null!==(_=S.collectionSpecificSortByOptions)&&void 0!==_?_:{}}),[{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][">="]?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:"_adaptRulesContextsToOverrideTags",value:function(t){return 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);s0&&(g.override_tags=this._adaptRulesContextsToOverrideTags(r.ruleContexts)),r.typesenseVectorQuery&&(g.vector_query=r.typesenseVectorQuery);var w=(null===(e=this.configuration.collectionSpecificSortByOptions)||void 0===e||null===(e=e[i])||void 0===e?void 0:e[g.sort_by])||(null===(n=this.configuration.sortByOptions)||void 0===n?void 0:n[g.sort_by]);return null!=(null==w?void 0:w.enable_overrides)&&(g.enable_overrides=w.enable_overrides),Object.fromEntries(Object.entries(g).filter((function(t){var e=v(t,2),n=(e[0],e[1]);return null!=n&&""!==n})))}},{key:"_camelToSnakeCase",value:function(t){return t.split(/(?=[A-Z])/).join("_").toLowerCase()}},{key:"request",value:(t=e(l().mark((function t(){var e,n,r,o,i,a,s,u,c,f=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.instantsearchRequests.map((function(t){return f._buildSearchParameters(t)})),o={},!0!==(null===(e=r[0])||void 0===e?void 0:e.conversation)&&"true"!==(null===(n=r[0])||void 0===n?void 0:n.conversation)||(i=r[0],a=i.q,s=i.conversation,u=i.conversation_id,c=i.conversation_model_id,o={q:a,conversation:s,conversation_id:u,conversation_model_id:c},r=r.map((function(t){return t.q,t.conversation,t.conversation_id,t.conversation_model_id,p(t,b)}))),t.abrupt("return",this.typesenseClient.multiSearch.perform({searches:r},o));case 4:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}],[{key:"INDEX_NAME_MATCHING_REGEX",get:function(){return new RegExp("^(.+?)(?=(/sort/(.*))|$)")}},{key:"DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX",get:function(){return new RegExp("(.*)((?!:).):(?!:)(.*)")}},{key:"DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX",get:function(){return new RegExp("(.*?)(<=|>=|>|<|=)(.*)")}}]);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:"_adaptUserData",value:function(t){return t?Array.isArray(t)?t:[t]:[]}},{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.typesenseResponse.metadata&&(e.appliedRules=["typesense-override"],e.userData=this._adaptUserData(this.typesenseResponse.metadata)),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 26f2320..32481f7 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,UAAUG,MAAMA,MAAMN,EAAQ,CAACF,EAAKS,WACxD,CACJ,CAER,CAGA,SAAS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EAChFywC,EAAe5tB,UAAS,OAAjC,OAAjBomB,EAAiByH,EAAA9vC,KAAA8vC,EAAA92B,OAAA,SAChBqvB,GAAiB,wBAAAyH,EAAAz1B,OAAA,GAAAu1B,EAAA,UACzB,SAAAG,GAAA,OAAAJ,EAAAz2C,MAAA,KAAAC,UAAA,KAAA8V,IAAA,aAAAnR,MAED,WAEE,OADAjE,KAAK2mC,gBAAkB,IAAIwP,EAAAA,aAAsBn2C,KAAK2I,cAAcu7B,QAC7DlkC,KAAK60C,YACd,GAAC,CAAAz/B,IAAA,sBAAAnR,MAED,SAAoBgN,GAIlB,OAHAjR,KAAK2I,cAAgB,IAAI0L,EAAcpD,GACvCjR,KAAK2I,cAAc2C,WACnBtL,KAAK2mC,gBAAkB,IAAIwP,EAAAA,aAAsBn2C,KAAK2I,cAAcu7B,SAC7D,CACT,GAAC,CAAA9uB,IAAA,2BAAAnR,MAED,SAAyBoxC,GACvB,GAAIA,EAAgBhmC,MAClB,MAAM,IAAIjD,MAAM,GAADhF,OAAIiuC,EAAgBrnC,KAAI,OAAA5G,OAAMiuC,EAAgBhmC,QAE/D,IAAKgmC,EAAgBhG,OAASgG,EAAgB7B,aAC5C,MAAM,IAAIpnC,MAAM,0BAADhF,OAA2BiuC,EAAgBrnC,KAAI,OAAA5G,OAAMiuC,EAAgBhmC,OAExF,KA3BC,IAAAymC,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 }\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 _adaptRulesContextsToOverrideTags(ruleContexts) {\n return ruleContexts.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 (params.ruleContexts && params.ruleContexts.length > 0) {\n typesenseSearchParams.override_tags = this._adaptRulesContextsToOverrideTags(params.ruleContexts);\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 _adaptUserData(metadata) {\n if (!metadata) return [];\n\n return Array.isArray(metadata) ? metadata : [metadata];\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 // Add appliedRules if metadata is present\n if (this.typesenseResponse.metadata) {\n adaptedResult.appliedRules = [\"typesense-override\"];\n adaptedResult.userData = this._adaptUserData(this.typesenseResponse.metadata);\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","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","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$","ruleContexts","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","override_tags","_adaptRulesContextsToOverrideTags","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","metadata","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","appliedRules","userData","_adaptUserData","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,EAAInB,EAAWoB,OAAQD,IAAK,CACxC,IAAIhB,EAAaH,EAAWmB,GAC5BE,KAAKlB,GAAegB,EAAIF,EACpBxB,EACA4B,KAAKC,cAAcnB,EAAYc,EAAOC,EAC9C,CAGAG,KAAKP,IAAMO,KAAKE,KACpB,CAIA,SAASC,EAAgCrB,EAAYc,EAAOC,GACxD,OAAO,kBACQL,UAAY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AED,SAAyB82C,GACvB,GAAIA,EAAgB1rC,MAClB,MAAM,IAAIjD,MAAM,GAADhF,OAAI2zC,EAAgB/sC,KAAI,OAAA5G,OAAM2zC,EAAgB1rC,QAE/D,IAAK0rC,EAAgBhG,OAASgG,EAAgB7B,aAC5C,MAAM,IAAI9sC,MAAM,0BAADhF,OAA2B2zC,EAAgB/sC,KAAI,OAAA5G,OAAM2zC,EAAgB1rC,OAExF,KA3BC,IAAAmsC,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.7.7 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\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\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 return value != null && Number.isFinite(value = +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\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\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 isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\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 setImmediate: _setImmediate,\n asap\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 if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\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.status\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\nconst _navigator = typeof navigator === 'object' && navigator || 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 = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\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\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv,\n navigator: _navigator,\n origin: origin\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', 'fetch'],\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 utils$1.isReadableStream(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 (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {\n return data;\n }\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 if (utils$1.isHeaders(header)) {\n for (const [key, value] of header.entries()) {\n setHeader(value, key, rewrite);\n }\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\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\n/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nconst progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(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 lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n};\n\nconst progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n};\n\nconst asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));\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 = platform.navigator && /(msie|trident)/i.test(platform.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\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\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\nvar resolveConfig = (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders$1.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils$1.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.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 headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\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\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, 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 // 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 (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\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(_config.url);\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 composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n };\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils$1.asap(unsubscribe);\n\n return signal;\n }\n};\n\nvar composeSignals$1 = composeSignals;\n\nconst streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nconst readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nconst trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n};\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n};\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils$1.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n });\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils$1.isBlob(body)) {\n return body.size;\n }\n\n if(utils$1.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils$1.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils$1.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n};\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils$1.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n};\n\nvar fetchAdapter = isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils$1.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders$1.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n });\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\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 VERSION = \"1.7.7\";\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 try {\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 } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\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 toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\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 }\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 _adaptRulesContextsToOverrideTags(ruleContexts) {\n return ruleContexts.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 (params.ruleContexts && params.ruleContexts.length > 0) {\n typesenseSearchParams.override_tags = this._adaptRulesContextsToOverrideTags(params.ruleContexts);\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 _adaptUserData(metadata) {\n if (!metadata) return [];\n\n return Array.isArray(metadata) ? metadata : [metadata];\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 // Add appliedRules if metadata is present\n if (this.typesenseResponse.metadata) {\n adaptedResult.appliedRules = [\"typesense-override\"];\n adaptedResult.userData = this._adaptUserData(this.typesenseResponse.metadata);\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","isReadableStream","isRequest","isResponse","isHeaders","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","_setImmediate","setImmediateSupported","setImmediate","postMessageSupported","postMessage","callbacks","shift","cb","asap","queueMicrotask","process","nextTick","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","_navigator","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","origin","href","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","settle","ERR_BAD_REQUEST","progressEventReducer","listener","isDownloadStream","freq","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","lastArgs","timestamp","threshold","args","clearTimeout","throttle","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","progressEventDecorator","throttled","asyncDecorator","isURLSameOrigin","msie","urlParsingNode","createElement","originURL","resolveURL","setAttribute","hash","hostname","pathname","requestURL","cookies","write","expires","domain","secure","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","paramsSerializer","timeoutMessage","withCredentials","withXSRFToken","onUploadProgress","onDownloadProgress","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","resolveConfig","newConfig","auth","btoa","username","password","unescape","Boolean","xsrfValue","xhrAdapter","XMLHttpRequest","_config","requestData","requestHeaders","onCanceled","uploadThrottled","downloadThrottled","flushUpload","flushDownload","unsubscribe","signal","onloadend","responseHeaders","getAllResponseHeaders","err","responseText","statusText","open","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","setRequestHeader","upload","abort","subscribe","parseProtocol","send","composeSignals$1","signals","controller","AbortController","reason","streamChunk","chunk","chunkSize","byteLength","end","pos","trackStream","stream","onProgress","onFinish","iterable","reader","getReader","readStream","readBytes","_onFinish","ReadableStream","pull","close","loadedBytes","enqueue","return","highWaterMark","isFetchSupported","fetch","Request","Response","isReadableStreamSupported","encodeText","TextEncoder","arrayBuffer","supportsRequestStream","duplexAccessed","hasContentType","duplex","supportsResponseStream","resolvers","res","ERR_NOT_SUPPORT","knownAdapters","http","xhr","fetchOptions","composedSignal","toAbortSignal","requestContentLength","getContentLength","_request","getBodyLength","resolveBodyLength","contentTypeHeader","flush","isCredentialsSupported","credentials","isStreamResponse","responseContentLength","responseData","renderReason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","validators$1","deprecatedWarnings","validator","version","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","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","_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","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","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$","ruleContexts","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","override_tags","_adaptRulesContextsToOverrideTags","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","metadata","adaptedRenderingContent","_adaptRenderingContent","grouped_hits","_adaptGroupedHits","nbHits","nbPages","_adaptFacets","facets_stats","_adaptFacetStats","processingTimeMS","search_time_ms","appliedRules","userData","_adaptUserData","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