From b3a2d7cbec82efcf3c2ff2c00f6b1065e6327386 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Wed, 15 Jan 2025 17:54:36 +0200 Subject: [PATCH 1/7] chore: bump typesense-js ver to 2.0.0-14 --- package-lock.json | 38 +++++++++++++++++++++++++++----------- package.json | 2 +- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6f08c5..f35ce4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "typesense": "^1.8.2" + "typesense": "^2.0.0-14" }, "devDependencies": { "@babel/cli": "^7.24.1", @@ -11999,12 +11999,14 @@ } }, "node_modules/typesense": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/typesense/-/typesense-1.8.2.tgz", - "integrity": "sha512-aBpePjA99Qvo+OP2pJwMpvga4Jrm1Y2oV5NsrWXBxlqUDNEUCPZBIksPv2Hq0jxQxHhLLyJVbjXjByXsvpCDVA==", + "version": "2.0.0-14", + "resolved": "https://registry.npmjs.org/typesense/-/typesense-2.0.0-14.tgz", + "integrity": "sha512-riT9va9dNkTYjzCCCPYz7I3UUziL3xtzA/ZAG0/AM39OYBysnzJuyOckfMnJXGKKTkjfdpT4BzEg2t4zf3cc1Q==", + "license": "Apache-2.0", "dependencies": { - "axios": "^1.6.0", - "loglevel": "^1.8.1" + "axios": "^1.7.2", + "loglevel": "^1.8.1", + "tslib": "^2.6.2" }, "engines": { "node": ">=18" @@ -12013,6 +12015,12 @@ "@babel/runtime": "^7.23.2" } }, + "node_modules/typesense/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -21323,12 +21331,20 @@ "dev": true }, "typesense": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/typesense/-/typesense-1.8.2.tgz", - "integrity": "sha512-aBpePjA99Qvo+OP2pJwMpvga4Jrm1Y2oV5NsrWXBxlqUDNEUCPZBIksPv2Hq0jxQxHhLLyJVbjXjByXsvpCDVA==", + "version": "2.0.0-14", + "resolved": "https://registry.npmjs.org/typesense/-/typesense-2.0.0-14.tgz", + "integrity": "sha512-riT9va9dNkTYjzCCCPYz7I3UUziL3xtzA/ZAG0/AM39OYBysnzJuyOckfMnJXGKKTkjfdpT4BzEg2t4zf3cc1Q==", "requires": { - "axios": "^1.6.0", - "loglevel": "^1.8.1" + "axios": "^1.7.2", + "loglevel": "^1.8.1", + "tslib": "^2.6.2" + }, + "dependencies": { + "tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + } } }, "unbox-primitive": { diff --git a/package.json b/package.json index c98492d..b946516 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "webpack-cli": "^5.1.4" }, "dependencies": { - "typesense": "^1.8.2" + "typesense": "^2.0.0-14" }, "peerDependencies": { "@babel/runtime": "^7.24.1" From 8e7497d86509756536a5cfd9bca3ad61da4f7b8c Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Wed, 15 Jan 2025 17:54:54 +0200 Subject: [PATCH 2/7] chore: build artifacts --- dist/typesense-instantsearch-adapter.js | 2828 +++++++---------- dist/typesense-instantsearch-adapter.js.map | 2 +- dist/typesense-instantsearch-adapter.min.js | 2 +- ...typesense-instantsearch-adapter.min.js.map | 2 +- 4 files changed, 1092 insertions(+), 1742 deletions(-) diff --git a/dist/typesense-instantsearch-adapter.js b/dist/typesense-instantsearch-adapter.js index 53bb0e9..653c69d 100644 --- a/dist/typesense-instantsearch-adapter.js +++ b/dist/typesense-instantsearch-adapter.js @@ -1447,43 +1447,18 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* /*!*************************************************!*\ !*** ./node_modules/typesense/lib/Typesense.js ***! \*************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Errors = exports.SearchClient = exports.Client = void 0; -var Client_1 = __importDefault(__webpack_require__(/*! ./Typesense/Client */ "./node_modules/typesense/lib/Typesense/Client.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Client_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Typesense/Client */ "./node_modules/typesense/lib/Typesense/Client.js")); exports.Client = Client_1.default; -var SearchClient_1 = __importDefault(__webpack_require__(/*! ./Typesense/SearchClient */ "./node_modules/typesense/lib/Typesense/SearchClient.js")); +var SearchClient_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Typesense/SearchClient */ "./node_modules/typesense/lib/Typesense/SearchClient.js")); exports.SearchClient = SearchClient_1.default; -var Errors = __importStar(__webpack_require__(/*! ./Typesense/Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js")); +var Errors = tslib_1.__importStar(__webpack_require__(/*! ./Typesense/Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js")); exports.Errors = Errors; exports["default"] = { Client: Client_1.default, SearchClient: SearchClient_1.default, Errors: Errors }; //# sourceMappingURL=Typesense.js.map @@ -1494,72 +1469,34 @@ exports["default"] = { Client: Client_1.default, SearchClient: SearchClient_1.de /*!*******************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Alias.js ***! \*******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Aliases_1 = __importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Aliases_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); var Alias = /** @class */ (function () { function Alias(name, apiCall) { this.name = name; this.apiCall = apiCall; } Alias.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Alias.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Alias.prototype.endpointPath = function () { - return "".concat(Aliases_1.default.RESOURCEPATH, "/").concat(this.name); + return "".concat(Aliases_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.name)); }; return Alias; }()); @@ -1572,68 +1509,33 @@ exports["default"] = Alias; /*!*********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Aliases.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/aliases"; var Aliases = /** @class */ (function () { function Aliases(apiCall) { this.apiCall = apiCall; } Aliases.prototype.upsert = function (name, mapping) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.put(this.endpointPath(name), mapping)]; }); }); }; Aliases.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; }); }); }; Aliases.prototype.endpointPath = function (aliasName) { - return "".concat(Aliases.RESOURCEPATH, "/").concat(aliasName); + return "".concat(Aliases.RESOURCEPATH, "/").concat(encodeURIComponent(aliasName)); }; Object.defineProperty(Aliases, "RESOURCEPATH", { get: function () { @@ -1653,16 +1555,15 @@ exports["default"] = Aliases; /*!***********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Analytics.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var AnalyticsRules_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); -var AnalyticsRule_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRule */ "./node_modules/typesense/lib/Typesense/AnalyticsRule.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var AnalyticsRules_1 = tslib_1.__importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); +var AnalyticsRule_1 = tslib_1.__importDefault(__webpack_require__(/*! ./AnalyticsRule */ "./node_modules/typesense/lib/Typesense/AnalyticsRule.js")); +var AnalyticsEvents_1 = tslib_1.__importDefault(__webpack_require__(/*! ./AnalyticsEvents */ "./node_modules/typesense/lib/Typesense/AnalyticsEvents.js")); var RESOURCEPATH = "/analytics"; var Analytics = /** @class */ (function () { function Analytics(apiCall) { @@ -1670,6 +1571,7 @@ var Analytics = /** @class */ (function () { this.individualAnalyticsRules = {}; this.apiCall = apiCall; this._analyticsRules = new AnalyticsRules_1.default(this.apiCall); + this._analyticsEvents = new AnalyticsEvents_1.default(this.apiCall); } Analytics.prototype.rules = function (id) { if (id === undefined) { @@ -1682,6 +1584,9 @@ var Analytics = /** @class */ (function () { return this.individualAnalyticsRules[id]; } }; + Analytics.prototype.events = function () { + return this._analyticsEvents; + }; Object.defineProperty(Analytics, "RESOURCEPATH", { get: function () { return RESOURCEPATH; @@ -1696,76 +1601,78 @@ exports["default"] = Analytics; /***/ }), +/***/ "./node_modules/typesense/lib/Typesense/AnalyticsEvents.js": +/*!*****************************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/AnalyticsEvents.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var RESOURCEPATH = "/analytics/events"; +var AnalyticsEvents = /** @class */ (function () { + function AnalyticsEvents(apiCall) { + this.apiCall = apiCall; + this.apiCall = apiCall; + } + AnalyticsEvents.prototype.create = function (params) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)]; + }); + }); + }; + AnalyticsEvents.prototype.endpointPath = function (operation) { + return "".concat(AnalyticsEvents.RESOURCEPATH).concat(operation === undefined ? "" : "/" + encodeURIComponent(operation)); + }; + Object.defineProperty(AnalyticsEvents, "RESOURCEPATH", { + get: function () { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return AnalyticsEvents; +}()); +exports["default"] = AnalyticsEvents; +//# sourceMappingURL=AnalyticsEvents.js.map + +/***/ }), + /***/ "./node_modules/typesense/lib/Typesense/AnalyticsRule.js": /*!***************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/AnalyticsRule.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var AnalyticsRules_1 = __importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var AnalyticsRules_1 = tslib_1.__importDefault(__webpack_require__(/*! ./AnalyticsRules */ "./node_modules/typesense/lib/Typesense/AnalyticsRules.js")); var AnalyticsRule = /** @class */ (function () { function AnalyticsRule(name, apiCall) { this.name = name; this.apiCall = apiCall; } AnalyticsRule.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; AnalyticsRule.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; AnalyticsRule.prototype.endpointPath = function () { - return "".concat(AnalyticsRules_1.default.RESOURCEPATH, "/").concat(this.name); + return "".concat(AnalyticsRules_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.name)); }; return AnalyticsRule; }()); @@ -1778,47 +1685,12 @@ exports["default"] = AnalyticsRule; /*!****************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/AnalyticsRules.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/analytics/rules"; var AnalyticsRules = /** @class */ (function () { function AnalyticsRules(apiCall) { @@ -1826,21 +1698,21 @@ var AnalyticsRules = /** @class */ (function () { this.apiCall = apiCall; } AnalyticsRules.prototype.upsert = function (name, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.put(this.endpointPath(name), params)]; }); }); }; AnalyticsRules.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; AnalyticsRules.prototype.endpointPath = function (operation) { - return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + encodeURIComponent(operation)); }; Object.defineProperty(AnalyticsRules, "RESOURCEPATH", { get: function () { @@ -1860,56 +1732,23 @@ exports["default"] = AnalyticsRules; /*!*********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/ApiCall.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var axios_1 = __importDefault(__webpack_require__(/*! axios */ "./node_modules/axios/dist/browser/axios.cjs")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var axios_1 = tslib_1.__importDefault(__webpack_require__(/*! axios */ "./node_modules/axios/dist/browser/axios.cjs")); +var http_1 = __webpack_require__(/*! http */ "?92a5"); +var https_1 = __webpack_require__(/*! https */ "?ba77"); var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./Errors/TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Errors/TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; var HEALTHY = true; var UNHEALTHY = false; +var isNodeJSEnvironment = typeof process !== "undefined" && + process.versions != null && + process.versions.node != null; var ApiCall = /** @class */ (function () { function ApiCall(configuration) { this.configuration = configuration; @@ -1936,8 +1775,8 @@ var ApiCall = /** @class */ (function () { ApiCall.prototype.get = function (endpoint, queryParameters, _a) { if (queryParameters === void 0) { queryParameters = {}; } var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d; - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_e) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_e) { return [2 /*return*/, this.performRequest("get", endpoint, { queryParameters: queryParameters, abortSignal: abortSignal, @@ -1948,8 +1787,8 @@ var ApiCall = /** @class */ (function () { }; ApiCall.prototype.delete = function (endpoint, queryParameters) { if (queryParameters === void 0) { queryParameters = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.performRequest("delete", endpoint, { queryParameters: queryParameters })]; }); }); @@ -1958,8 +1797,8 @@ var ApiCall = /** @class */ (function () { if (bodyParameters === void 0) { bodyParameters = {}; } if (queryParameters === void 0) { queryParameters = {}; } if (additionalHeaders === void 0) { additionalHeaders = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.performRequest("post", endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters, @@ -1971,8 +1810,8 @@ var ApiCall = /** @class */ (function () { ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) { if (bodyParameters === void 0) { bodyParameters = {}; } if (queryParameters === void 0) { queryParameters = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.performRequest("put", endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters, @@ -1983,8 +1822,8 @@ var ApiCall = /** @class */ (function () { ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) { if (bodyParameters === void 0) { bodyParameters = {}; } if (queryParameters === void 0) { queryParameters = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.performRequest("patch", endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters, @@ -1993,20 +1832,21 @@ var ApiCall = /** @class */ (function () { }); }; ApiCall.prototype.performRequest = function (requestType, endpoint, _a) { - var _b, _c, _d; - var _e = _a.queryParameters, queryParameters = _e === void 0 ? null : _e, _f = _a.bodyParameters, bodyParameters = _f === void 0 ? null : _f, _g = _a.additionalHeaders, additionalHeaders = _g === void 0 ? {} : _g, _h = _a.abortSignal, abortSignal = _h === void 0 ? null : _h, _j = _a.responseType, responseType = _j === void 0 ? undefined : _j, _k = _a.skipConnectionTimeout, skipConnectionTimeout = _k === void 0 ? false : _k; - return __awaiter(this, void 0, void 0, function () { - var requestNumber, lastException, _loop_1, this_1, numTries, state_1; - return __generator(this, function (_l) { - switch (_l.label) { + var _b, _c, _d, _e; + var _f = _a.queryParameters, queryParameters = _f === void 0 ? null : _f, _g = _a.bodyParameters, bodyParameters = _g === void 0 ? null : _g, _h = _a.additionalHeaders, additionalHeaders = _h === void 0 ? {} : _h, _j = _a.abortSignal, abortSignal = _j === void 0 ? null : _j, _k = _a.responseType, responseType = _k === void 0 ? undefined : _k, _l = _a.skipConnectionTimeout, skipConnectionTimeout = _l === void 0 ? false : _l, _m = _a.enableKeepAlive, enableKeepAlive = _m === void 0 ? undefined : _m; + return tslib_1.__awaiter(this, void 0, void 0, function () { + var requestNumber, lastException, wasAborted, _loop_1, this_1, numTries, state_1; + return tslib_1.__generator(this, function (_o) { + switch (_o.label) { case 0: this.configuration.validate(); requestNumber = Date.now(); + wasAborted = false; this.logger.debug("Request #".concat(requestNumber, ": Performing ").concat(requestType.toUpperCase(), " request: ").concat(endpoint)); _loop_1 = function (numTries) { var node, abortListener, requestOptions, cancelToken, source_1, response, error_1; - return __generator(this, function (_m) { - switch (_m.label) { + return tslib_1.__generator(this, function (_p) { + switch (_p.label) { case 0: node = this_1.getNextNode(requestNumber); this_1.logger.debug("Request #".concat(requestNumber, ": Attempting ").concat(requestType.toUpperCase(), " request Try #").concat(numTries, " to Node ").concat(node.index)); @@ -2014,10 +1854,11 @@ var ApiCall = /** @class */ (function () { return [2 /*return*/, { value: Promise.reject(new Error("Request aborted by caller.")) }]; } abortListener = void 0; - _m.label = 1; + _p.label = 1; case 1: - _m.trys.push([1, 3, 5, 6]); + _p.trys.push([1, 3, 5, 6]); requestOptions = { + adapter: this_1.configuration.axiosAdapter, method: requestType, url: this_1.uriFor(endpoint, node), headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders), @@ -2058,10 +1899,32 @@ var ApiCall = /** @class */ (function () { this_1.logger.debug("Request #".concat(requestNumber, ": Using custom httpAgent")); requestOptions.httpAgent = this_1.configuration.httpAgent; } + else if (enableKeepAlive === true) { + if (!isNodeJSEnvironment) { + this_1.logger.warn("Request #".concat(requestNumber, ": Cannot use custom httpAgent in a browser environment to enable keepAlive")); + } + else { + this_1.logger.debug("Request #".concat(requestNumber, ": Enabling KeepAlive")); + requestOptions.httpAgent = new http_1.Agent({ keepAlive: true }); + } + } if (this_1.configuration.httpsAgent) { this_1.logger.debug("Request #".concat(requestNumber, ": Using custom httpsAgent")); requestOptions.httpsAgent = this_1.configuration.httpsAgent; } + else if (enableKeepAlive === true) { + if (!isNodeJSEnvironment) { + this_1.logger.warn("Request #".concat(requestNumber, ": Cannot use custom httpAgent in a browser environment to enable keepAlive")); + } + else { + this_1.logger.debug("Request #".concat(requestNumber, ": Enabling keepAlive")); + requestOptions.httpsAgent = new https_1.Agent({ keepAlive: true }); + } + } + if (this_1.configuration.paramsSerializer) { + this_1.logger.debug("Request #".concat(requestNumber, ": Using custom paramsSerializer")); + requestOptions.paramsSerializer = this_1.configuration.paramsSerializer; + } if (bodyParameters && ((typeof bodyParameters === "string" && bodyParameters.length !== 0) || @@ -2073,13 +1936,16 @@ var ApiCall = /** @class */ (function () { if (abortSignal) { cancelToken = axios_1.default.CancelToken; source_1 = cancelToken.source(); - abortListener = function () { return source_1.cancel(); }; + abortListener = function () { + wasAborted = true; + source_1.cancel(); + }; abortSignal.addEventListener("abort", abortListener); requestOptions.cancelToken = source_1.token; } return [4 /*yield*/, (0, axios_1.default)(requestOptions)]; case 2: - response = _m.sent(); + response = _p.sent(); if (response.status >= 1 && response.status <= 499) { // Treat any status code > 0 and < 500 to be an indication that node is healthy // We exclude 0 since some clients return 0 when request fails @@ -2099,18 +1965,25 @@ var ApiCall = /** @class */ (function () { } return [3 /*break*/, 6]; case 3: - error_1 = _m.sent(); + error_1 = _p.sent(); // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts - this_1.setNodeHealthcheck(node, UNHEALTHY); + if (!wasAborted) { + this_1.setNodeHealthcheck(node, UNHEALTHY); + } lastException = error_1; - this_1.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(error_1.code, " ").concat(error_1.message).concat(error_1.response == null + this_1.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat((_d = error_1 === null || error_1 === void 0 ? void 0 : error_1.code) !== null && _d !== void 0 ? _d : "", " ").concat(error_1.message).concat(error_1.response == null ? "" - : " - " + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), "\"")); + : " - " + JSON.stringify((_e = error_1.response) === null || _e === void 0 ? void 0 : _e.data), "\"")); // this.logger.debug(error.stack) - this_1.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(this_1.retryIntervalSeconds, "s and then retrying request...")); + if (wasAborted) { + return [2 /*return*/, { value: Promise.reject(new Error("Request aborted by caller.")) }]; + } + if (numTries < this_1.numRetriesPerRequest + 1) { + this_1.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(this_1.retryIntervalSeconds, "s and then retrying request...")); + } return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)]; case 4: - _m.sent(); + _p.sent(); return [3 /*break*/, 6]; case 5: if (abortSignal && abortListener) { @@ -2123,15 +1996,15 @@ var ApiCall = /** @class */ (function () { }; this_1 = this; numTries = 1; - _l.label = 1; + _o.label = 1; case 1: if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 /*break*/, 4]; return [5 /*yield**/, _loop_1(numTries)]; case 2: - state_1 = _l.sent(); + state_1 = _o.sent(); if (typeof state_1 === "object") return [2 /*return*/, state_1.value]; - _l.label = 3; + _o.label = 3; case 3: numTries++; return [3 /*break*/, 1]; @@ -2217,8 +2090,8 @@ var ApiCall = /** @class */ (function () { return defaultHeaders; }; ApiCall.prototype.timer = function (seconds) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, seconds * 1000); })]; }); }); @@ -2265,35 +2138,34 @@ exports["default"] = ApiCall; /*!********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Client.js ***! \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /* eslint-disable no-dupe-class-members */ -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Configuration_1 = __importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); -var ApiCall_1 = __importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Collection_1 = __importDefault(__webpack_require__(/*! ./Collection */ "./node_modules/typesense/lib/Typesense/Collection.js")); -var Aliases_1 = __importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); -var Alias_1 = __importDefault(__webpack_require__(/*! ./Alias */ "./node_modules/typesense/lib/Typesense/Alias.js")); -var Keys_1 = __importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); -var Key_1 = __importDefault(__webpack_require__(/*! ./Key */ "./node_modules/typesense/lib/Typesense/Key.js")); -var Debug_1 = __importDefault(__webpack_require__(/*! ./Debug */ "./node_modules/typesense/lib/Typesense/Debug.js")); -var Metrics_1 = __importDefault(__webpack_require__(/*! ./Metrics */ "./node_modules/typesense/lib/Typesense/Metrics.js")); -var Health_1 = __importDefault(__webpack_require__(/*! ./Health */ "./node_modules/typesense/lib/Typesense/Health.js")); -var Operations_1 = __importDefault(__webpack_require__(/*! ./Operations */ "./node_modules/typesense/lib/Typesense/Operations.js")); -var MultiSearch_1 = __importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); -var Presets_1 = __importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); -var Preset_1 = __importDefault(__webpack_require__(/*! ./Preset */ "./node_modules/typesense/lib/Typesense/Preset.js")); -var Analytics_1 = __importDefault(__webpack_require__(/*! ./Analytics */ "./node_modules/typesense/lib/Typesense/Analytics.js")); -var Stopwords_1 = __importDefault(__webpack_require__(/*! ./Stopwords */ "./node_modules/typesense/lib/Typesense/Stopwords.js")); -var Stopword_1 = __importDefault(__webpack_require__(/*! ./Stopword */ "./node_modules/typesense/lib/Typesense/Stopword.js")); -var Conversations_1 = __importDefault(__webpack_require__(/*! ./Conversations */ "./node_modules/typesense/lib/Typesense/Conversations.js")); -var Conversation_1 = __importDefault(__webpack_require__(/*! ./Conversation */ "./node_modules/typesense/lib/Typesense/Conversation.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Configuration_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); +var ApiCall_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Collection_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collection */ "./node_modules/typesense/lib/Typesense/Collection.js")); +var Aliases_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Aliases */ "./node_modules/typesense/lib/Typesense/Aliases.js")); +var Alias_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Alias */ "./node_modules/typesense/lib/Typesense/Alias.js")); +var Keys_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); +var Key_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Key */ "./node_modules/typesense/lib/Typesense/Key.js")); +var Debug_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Debug */ "./node_modules/typesense/lib/Typesense/Debug.js")); +var Metrics_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Metrics */ "./node_modules/typesense/lib/Typesense/Metrics.js")); +var Stats_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Stats */ "./node_modules/typesense/lib/Typesense/Stats.js")); +var Health_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Health */ "./node_modules/typesense/lib/Typesense/Health.js")); +var Operations_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Operations */ "./node_modules/typesense/lib/Typesense/Operations.js")); +var MultiSearch_1 = tslib_1.__importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); +var Presets_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); +var Preset_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Preset */ "./node_modules/typesense/lib/Typesense/Preset.js")); +var Analytics_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Analytics */ "./node_modules/typesense/lib/Typesense/Analytics.js")); +var Stopwords_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Stopwords */ "./node_modules/typesense/lib/Typesense/Stopwords.js")); +var Stopword_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Stopword */ "./node_modules/typesense/lib/Typesense/Stopword.js")); +var Conversations_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Conversations */ "./node_modules/typesense/lib/Typesense/Conversations.js")); +var Conversation_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Conversation */ "./node_modules/typesense/lib/Typesense/Conversation.js")); var Client = /** @class */ (function () { function Client(options) { var _a; @@ -2302,6 +2174,7 @@ var Client = /** @class */ (function () { this.apiCall = new ApiCall_1.default(this.configuration); this.debug = new Debug_1.default(this.apiCall); this.metrics = new Metrics_1.default(this.apiCall); + this.stats = new Stats_1.default(this.apiCall); this.health = new Health_1.default(this.apiCall); this.operations = new Operations_1.default(this.apiCall); this.multiSearch = new MultiSearch_1.default(this.apiCall, this.configuration); @@ -2396,57 +2269,19 @@ exports["default"] = Client; /*!************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Collection.js ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Documents_1 = __importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Documents_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); -var Overrides_1 = __importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); -var Override_1 = __importDefault(__webpack_require__(/*! ./Override */ "./node_modules/typesense/lib/Typesense/Override.js")); -var Synonyms_1 = __importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); -var Synonym_1 = __importDefault(__webpack_require__(/*! ./Synonym */ "./node_modules/typesense/lib/Typesense/Synonym.js")); +var Overrides_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); +var Override_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Override */ "./node_modules/typesense/lib/Typesense/Override.js")); +var Synonyms_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); +var Synonym_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Synonym */ "./node_modules/typesense/lib/Typesense/Synonym.js")); var Document_1 = __webpack_require__(/*! ./Document */ "./node_modules/typesense/lib/Typesense/Document.js"); var Collection = /** @class */ (function () { function Collection(name, apiCall, configuration) { @@ -2464,30 +2299,31 @@ var Collection = /** @class */ (function () { this._synonyms = new Synonyms_1.default(this.name, this.apiCall); } Collection.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Collection.prototype.update = function (schema) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)]; }); }); }; - Collection.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + Collection.prototype.delete = function (options) { + if (options === void 0) { options = {}; } + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath(), options)]; }); }); }; Collection.prototype.exists = function () { - return __awaiter(this, void 0, void 0, function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { var e_1; - return __generator(this, function (_a) { + return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); @@ -2539,7 +2375,7 @@ var Collection = /** @class */ (function () { } }; Collection.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.name); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.name)); }; return Collection; }()); @@ -2552,47 +2388,12 @@ exports["default"] = Collection; /*!*************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Collections.js ***! \*************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/collections"; var Collections = /** @class */ (function () { function Collections(apiCall) { @@ -2600,16 +2401,17 @@ var Collections = /** @class */ (function () { } Collections.prototype.create = function (schema, options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)]; }); }); }; - Collections.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + Collections.prototype.retrieve = function (options) { + if (options === void 0) { options = {}; } + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH, options)]; }); }); }; @@ -2631,46 +2433,13 @@ exports["default"] = Collections; /*!***************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Configuration.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var logger = __importStar(__webpack_require__(/*! loglevel */ "./node_modules/loglevel/lib/loglevel.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var logger = tslib_1.__importStar(__webpack_require__(/*! loglevel */ "./node_modules/loglevel/lib/loglevel.js")); var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); var Configuration = /** @class */ (function () { function Configuration(options) { @@ -2679,7 +2448,7 @@ var Configuration = /** @class */ (function () { this.nodes = this.nodes .map(function (node) { return _this.setDefaultPathInNode(node); }) .map(function (node) { return _this.setDefaultPortInNode(node); }) - .map(function (node) { return (__assign({}, node)); }); // Make a deep copy + .map(function (node) { return (tslib_1.__assign({}, node)); }); // Make a deep copy if (options.randomizeNodes == null) { options.randomizeNodes = true; } @@ -2693,21 +2462,23 @@ var Configuration = /** @class */ (function () { options.connectionTimeoutSeconds || options.timeoutSeconds || 5; this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60; this.numRetries = - options.numRetries || - this.nodes.length + (this.nearestNode == null ? 0 : 1) || - 3; + (options.numRetries !== undefined && options.numRetries >= 0 + ? options.numRetries + : this.nodes.length + (this.nearestNode == null ? 0 : 1)) || 3; this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1; this.apiKey = options.apiKey; this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient this.cacheSearchResultsForSeconds = options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default this.useServerSideSearchCache = options.useServerSideSearchCache || false; + this.axiosAdapter = options.axiosAdapter; this.logger = options.logger || logger; this.logLevel = options.logLevel || "warn"; this.logger.setLevel(this.logLevel); this.additionalHeaders = options.additionalHeaders; this.httpAgent = options.httpAgent; this.httpsAgent = options.httpsAgent; + this.paramsSerializer = options.paramsSerializer; this.showDeprecationWarnings(options); this.validate(); } @@ -2785,79 +2556,41 @@ exports["default"] = Configuration; /*!**************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Conversation.js ***! \**************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Conversations_1 = __importDefault(__webpack_require__(/*! ./Conversations */ "./node_modules/typesense/lib/Typesense/Conversations.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Conversations_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Conversations */ "./node_modules/typesense/lib/Typesense/Conversations.js")); var Conversation = /** @class */ (function () { function Conversation(id, apiCall) { this.id = id; this.apiCall = apiCall; } Conversation.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Conversation.prototype.update = function (params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)]; }); }); }; Conversation.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Conversation.prototype.endpointPath = function () { - return "".concat(Conversations_1.default.RESOURCEPATH, "/").concat(this.id); + return "".concat(Conversations_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.id)); }; return Conversation; }()); @@ -2870,79 +2603,41 @@ exports["default"] = Conversation; /*!*******************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/ConversationModel.js ***! \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var ConversationModels_1 = __importDefault(__webpack_require__(/*! ./ConversationModels */ "./node_modules/typesense/lib/Typesense/ConversationModels.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var ConversationModels_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ConversationModels */ "./node_modules/typesense/lib/Typesense/ConversationModels.js")); var ConversationModel = /** @class */ (function () { function ConversationModel(id, apiCall) { this.id = id; this.apiCall = apiCall; } ConversationModel.prototype.update = function (params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)]; }); }); }; ConversationModel.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; ConversationModel.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; ConversationModel.prototype.endpointPath = function () { - return "".concat(ConversationModels_1.default.RESOURCEPATH, "/").concat(this.id); + return "".concat(ConversationModels_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.id)); }; return ConversationModel; }()); @@ -2955,47 +2650,12 @@ exports["default"] = ConversationModel; /*!********************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/ConversationModels.js ***! \********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/conversations/models"; var ConversationModels = /** @class */ (function () { function ConversationModels(apiCall) { @@ -3003,21 +2663,21 @@ var ConversationModels = /** @class */ (function () { this.apiCall = apiCall; } ConversationModels.prototype.create = function (params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)]; }); }); }; ConversationModels.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; ConversationModels.prototype.endpointPath = function (operation) { - return "".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? "" : "/" + encodeURIComponent(operation)); }; Object.defineProperty(ConversationModels, "RESOURCEPATH", { get: function () { @@ -3037,52 +2697,14 @@ exports["default"] = ConversationModels; /*!***************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Conversations.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var ConversationModels_1 = __importDefault(__webpack_require__(/*! ./ConversationModels */ "./node_modules/typesense/lib/Typesense/ConversationModels.js")); -var ConversationModel_1 = __importDefault(__webpack_require__(/*! ./ConversationModel */ "./node_modules/typesense/lib/Typesense/ConversationModel.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var ConversationModels_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ConversationModels */ "./node_modules/typesense/lib/Typesense/ConversationModels.js")); +var ConversationModel_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ConversationModel */ "./node_modules/typesense/lib/Typesense/ConversationModel.js")); var RESOURCEPATH = "/conversations"; var Conversations = /** @class */ (function () { function Conversations(apiCall) { @@ -3092,8 +2714,8 @@ var Conversations = /** @class */ (function () { this._conversationsModels = new ConversationModels_1.default(this.apiCall); } Conversations.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; }); }); @@ -3127,55 +2749,20 @@ exports["default"] = Conversations; /*!*******************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Debug.js ***! \*******************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/debug"; var Debug = /** @class */ (function () { function Debug(apiCall) { this.apiCall = apiCall; } Debug.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; }); }); @@ -3191,53 +2778,15 @@ exports["default"] = Debug; /*!**********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Document.js ***! \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Document = void 0; -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Documents_1 = __importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Documents_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js")); var Document = /** @class */ (function () { function Document(collectionName, documentId, apiCall) { this.collectionName = collectionName; @@ -3245,29 +2794,29 @@ var Document = /** @class */ (function () { this.apiCall = apiCall; } Document.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; - Document.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; + Document.prototype.delete = function (options) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, this.apiCall.delete(this.endpointPath(), options)]; }); }); }; Document.prototype.update = function (partialDocument, options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.patch(this.endpointPath(), partialDocument, options)]; }); }); }; Document.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Documents_1.default.RESOURCEPATH, "/").concat(this.documentId); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.collectionName)).concat(Documents_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.documentId)); }; return Document; }()); @@ -3280,73 +2829,44 @@ exports.Document = Document; /*!***********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Documents.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.arrayableParams = void 0; +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var Errors_1 = __webpack_require__(/*! ./Errors */ "./node_modules/typesense/lib/Typesense/Errors/index.js"); var SearchOnlyDocuments_1 = __webpack_require__(/*! ./SearchOnlyDocuments */ "./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js"); +exports.arrayableParams = { + query_by: "query_by", + query_by_weights: "query_by_weights", + facet_by: "facet_by", + group_by: "group_by", + include_fields: "include_fields", + exclude_fields: "exclude_fields", + highlight_fields: "highlight_fields", + highlight_full_fields: "highlight_full_fields", + pinned_hits: "pinned_hits", + hidden_hits: "hidden_hits", + infix: "infix", + override_tags: "override_tags", + num_typos: "num_typos", + prefix: "prefix", + sort_by: "sort_by", +}; +var isNodeJSEnvironment = typeof process !== "undefined" && + process.versions != null && + process.versions.node != null; var Documents = /** @class */ (function (_super) { - __extends(Documents, _super); + tslib_1.__extends(Documents, _super); function Documents(collectionName, apiCall, configuration) { return _super.call(this, collectionName, apiCall, configuration) || this; } Documents.prototype.create = function (document, options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { if (!document) throw new Error("No document provided"); return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)]; @@ -3355,8 +2875,8 @@ var Documents = /** @class */ (function (_super) { }; Documents.prototype.upsert = function (document, options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { if (!document) throw new Error("No document provided"); return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: "upsert" }))]; @@ -3365,8 +2885,8 @@ var Documents = /** @class */ (function (_super) { }; Documents.prototype.update = function (document, options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { if (!document) throw new Error("No document provided"); if (options["filter_by"] != null) { @@ -3381,16 +2901,16 @@ var Documents = /** @class */ (function (_super) { }; Documents.prototype.delete = function (query) { if (query === void 0) { query = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath(), query)]; }); }); }; Documents.prototype.createMany = function (documents, options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"); return [2 /*return*/, this.import(documents, options)]; }); @@ -3398,9 +2918,9 @@ var Documents = /** @class */ (function (_super) { }; Documents.prototype.import = function (documents, options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems; - return __generator(this, function (_a) { + return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: if (Array.isArray(documents)) { @@ -3411,8 +2931,8 @@ var Documents = /** @class */ (function (_super) { } catch (error) { // if rangeerror, throw custom error message - if (RangeError instanceof error && - (error === null || error === void 0 ? void 0 : error.includes("Too many properties to enumerate"))) { + if (error instanceof RangeError && + error.message.includes("Too many properties to enumerate")) { throw new Error("".concat(error, "\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n ")); } // else, throw the non-range error anyways @@ -3427,6 +2947,7 @@ var Documents = /** @class */ (function (_super) { bodyParameters: documentsInJSONLFormat, additionalHeaders: { "Content-Type": "text/plain" }, skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully + enableKeepAlive: isNodeJSEnvironment ? true : false, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991 })]; case 1: resultsInJSONLFormat = _a.sent(); @@ -3450,13 +2971,46 @@ var Documents = /** @class */ (function (_super) { }); }); }; + /** + * Imports documents from a NodeJS readable stream of JSONL. + */ + Documents.prototype.importStream = function (readableStream, options) { + if (options === void 0) { options = {}; } + return tslib_1.__awaiter(this, void 0, void 0, function () { + var resultsInJSONLFormat, resultsInJSONFormat, failedItems; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.apiCall.performRequest("post", this.endpointPath("import"), { + queryParameters: options, + bodyParameters: readableStream, + additionalHeaders: { "Content-Type": "text/plain" }, + skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully + enableKeepAlive: isNodeJSEnvironment ? true : false, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991 + })]; + case 1: + resultsInJSONLFormat = _a.sent(); + resultsInJSONFormat = resultsInJSONLFormat + .split("\n") + .map(function (r) { return JSON.parse(r); }); + failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; }); + if (failedItems.length > 0) { + throw new Errors_1.ImportError("".concat(resultsInJSONFormat.length - failedItems.length, " documents imported successfully, ").concat(failedItems.length, " documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."), resultsInJSONFormat); + } + else { + return [2 /*return*/, resultsInJSONFormat]; + } + return [2 /*return*/]; + } + }); + }); + }; /** * Returns a JSONL string for all the documents in this collection */ Documents.prototype.export = function (options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options)]; }); }); @@ -3466,8 +3020,8 @@ var Documents = /** @class */ (function (_super) { */ Documents.prototype.exportStream = function (options) { if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options, { responseType: "stream", })]; @@ -3485,32 +3039,15 @@ exports["default"] = Documents; /*!******************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/HTTPError.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var HTTPError = /** @class */ (function (_super) { - __extends(HTTPError, _super); + tslib_1.__extends(HTTPError, _super); function HTTPError() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3525,32 +3062,15 @@ exports["default"] = HTTPError; /*!********************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/ImportError.js ***! \********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var ImportError = /** @class */ (function (_super) { - __extends(ImportError, _super); + tslib_1.__extends(ImportError, _super); function ImportError(message, importResults) { var _this = _super.call(this, message) || this; _this.importResults = importResults; @@ -3567,32 +3087,15 @@ exports["default"] = ImportError; /*!**********************************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js ***! \**********************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var MissingConfigurationError = /** @class */ (function (_super) { - __extends(MissingConfigurationError, _super); + tslib_1.__extends(MissingConfigurationError, _super); function MissingConfigurationError() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3607,32 +3110,15 @@ exports["default"] = MissingConfigurationError; /*!****************************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js ***! \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var ObjectAlreadyExists = /** @class */ (function (_super) { - __extends(ObjectAlreadyExists, _super); + tslib_1.__extends(ObjectAlreadyExists, _super); function ObjectAlreadyExists() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3647,32 +3133,15 @@ exports["default"] = ObjectAlreadyExists; /*!***********************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js ***! \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var ObjectNotFound = /** @class */ (function (_super) { - __extends(ObjectNotFound, _super); + tslib_1.__extends(ObjectNotFound, _super); function ObjectNotFound() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3687,32 +3156,15 @@ exports["default"] = ObjectNotFound; /*!****************************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js ***! \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var ObjectUnprocessable = /** @class */ (function (_super) { - __extends(ObjectUnprocessable, _super); + tslib_1.__extends(ObjectUnprocessable, _super); function ObjectUnprocessable() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3727,32 +3179,15 @@ exports["default"] = ObjectUnprocessable; /*!*************************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js ***! \*************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var RequestMalformed = /** @class */ (function (_super) { - __extends(RequestMalformed, _super); + tslib_1.__extends(RequestMalformed, _super); function RequestMalformed() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3767,32 +3202,15 @@ exports["default"] = RequestMalformed; /*!****************************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js ***! \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var RequestUnauthorized = /** @class */ (function (_super) { - __extends(RequestUnauthorized, _super); + tslib_1.__extends(RequestUnauthorized, _super); function RequestUnauthorized() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3807,32 +3225,15 @@ exports["default"] = RequestUnauthorized; /*!********************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/ServerError.js ***! \********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); var ServerError = /** @class */ (function (_super) { - __extends(ServerError, _super); + tslib_1.__extends(ServerError, _super); function ServerError() { return _super !== null && _super.apply(this, arguments) || this; } @@ -3847,28 +3248,14 @@ exports["default"] = ServerError; /*!***********************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js ***! \***********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var TypesenseError = /** @class */ (function (_super) { - __extends(TypesenseError, _super); + tslib_1.__extends(TypesenseError, _super); // Source: https://stackoverflow.com/a/58417721/123545 function TypesenseError(message) { var _newTarget = this.constructor; @@ -3888,34 +3275,32 @@ exports["default"] = TypesenseError; /*!**************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Errors/index.js ***! \**************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0; -var HTTPError_1 = __importDefault(__webpack_require__(/*! ./HTTPError */ "./node_modules/typesense/lib/Typesense/Errors/HTTPError.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var HTTPError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./HTTPError */ "./node_modules/typesense/lib/Typesense/Errors/HTTPError.js")); exports.HTTPError = HTTPError_1.default; -var MissingConfigurationError_1 = __importDefault(__webpack_require__(/*! ./MissingConfigurationError */ "./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js")); +var MissingConfigurationError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./MissingConfigurationError */ "./node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.js")); exports.MissingConfigurationError = MissingConfigurationError_1.default; -var ObjectAlreadyExists_1 = __importDefault(__webpack_require__(/*! ./ObjectAlreadyExists */ "./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js")); +var ObjectAlreadyExists_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ObjectAlreadyExists */ "./node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.js")); exports.ObjectAlreadyExists = ObjectAlreadyExists_1.default; -var ObjectNotFound_1 = __importDefault(__webpack_require__(/*! ./ObjectNotFound */ "./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js")); +var ObjectNotFound_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ObjectNotFound */ "./node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.js")); exports.ObjectNotFound = ObjectNotFound_1.default; -var ObjectUnprocessable_1 = __importDefault(__webpack_require__(/*! ./ObjectUnprocessable */ "./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js")); +var ObjectUnprocessable_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ObjectUnprocessable */ "./node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.js")); exports.ObjectUnprocessable = ObjectUnprocessable_1.default; -var RequestMalformed_1 = __importDefault(__webpack_require__(/*! ./RequestMalformed */ "./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js")); +var RequestMalformed_1 = tslib_1.__importDefault(__webpack_require__(/*! ./RequestMalformed */ "./node_modules/typesense/lib/Typesense/Errors/RequestMalformed.js")); exports.RequestMalformed = RequestMalformed_1.default; -var RequestUnauthorized_1 = __importDefault(__webpack_require__(/*! ./RequestUnauthorized */ "./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js")); +var RequestUnauthorized_1 = tslib_1.__importDefault(__webpack_require__(/*! ./RequestUnauthorized */ "./node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.js")); exports.RequestUnauthorized = RequestUnauthorized_1.default; -var ServerError_1 = __importDefault(__webpack_require__(/*! ./ServerError */ "./node_modules/typesense/lib/Typesense/Errors/ServerError.js")); +var ServerError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ServerError */ "./node_modules/typesense/lib/Typesense/Errors/ServerError.js")); exports.ServerError = ServerError_1.default; -var ImportError_1 = __importDefault(__webpack_require__(/*! ./ImportError */ "./node_modules/typesense/lib/Typesense/Errors/ImportError.js")); +var ImportError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ImportError */ "./node_modules/typesense/lib/Typesense/Errors/ImportError.js")); exports.ImportError = ImportError_1.default; -var TypesenseError_1 = __importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); +var TypesenseError_1 = tslib_1.__importDefault(__webpack_require__(/*! ./TypesenseError */ "./node_modules/typesense/lib/Typesense/Errors/TypesenseError.js")); exports.TypesenseError = TypesenseError_1.default; //# sourceMappingURL=index.js.map @@ -3925,55 +3310,20 @@ exports.TypesenseError = TypesenseError_1.default; /*!********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Health.js ***! \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/health"; var Health = /** @class */ (function () { function Health(apiCall) { this.apiCall = apiCall; } Health.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; }); }); @@ -3989,72 +3339,34 @@ exports["default"] = Health; /*!*****************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Key.js ***! \*****************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Keys_1 = __importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Keys_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Keys */ "./node_modules/typesense/lib/Typesense/Keys.js")); var Key = /** @class */ (function () { function Key(id, apiCall) { this.id = id; this.apiCall = apiCall; } Key.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Key.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Key.prototype.endpointPath = function () { - return "".concat(Keys_1.default.RESOURCEPATH, "/").concat(this.id); + return "".concat(Keys_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.id)); }; return Key; }()); @@ -4067,48 +3379,14 @@ exports["default"] = Key; /*!******************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Keys.js ***! \******************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var crypto_1 = __webpack_require__(/*! crypto */ "?6884"); +var Utils_1 = __webpack_require__(/*! ./Utils */ "./node_modules/typesense/lib/Typesense/Utils.js"); var RESOURCEPATH = "/keys"; var Keys = /** @class */ (function () { function Keys(apiCall) { @@ -4116,15 +3394,15 @@ var Keys = /** @class */ (function () { this.apiCall = apiCall; } Keys.prototype.create = function (params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)]; }); }); }; Keys.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; }); }); @@ -4132,7 +3410,8 @@ var Keys = /** @class */ (function () { Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) { // Note: only a key generated with the `documents:search` action will be // accepted by the server, when usined with the search endpoint. - var paramsJSON = JSON.stringify(parameters); + var normalizedParams = (0, Utils_1.normalizeArrayableParams)(parameters); + var paramsJSON = JSON.stringify(normalizedParams); var digest = Buffer.from((0, crypto_1.createHmac)("sha256", searchKey).update(paramsJSON).digest("base64")); var keyPrefix = searchKey.substr(0, 4); var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); @@ -4156,55 +3435,20 @@ exports["default"] = Keys; /*!*********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Metrics.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/metrics.json"; var Metrics = /** @class */ (function () { function Metrics(apiCall) { this.apiCall = apiCall; } Metrics.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; }); }); @@ -4220,51 +3464,14 @@ exports["default"] = Metrics; /*!*************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/MultiSearch.js ***! \*************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var RequestWithCache_1 = __importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var RequestWithCache_1 = tslib_1.__importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); +var Utils_1 = __webpack_require__(/*! ./Utils */ "./node_modules/typesense/lib/Typesense/Utils.js"); var RESOURCEPATH = "/multi_search"; var MultiSearch = /** @class */ (function () { function MultiSearch(apiCall, configuration, useTextContentType) { @@ -4281,9 +3488,9 @@ var MultiSearch = /** @class */ (function () { if (commonParams === void 0) { commonParams = {}; } var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration .cacheSearchResultsForSeconds : _c; - return __awaiter(this, void 0, void 0, function () { - var additionalHeaders, additionalQueryParams, queryParams; - return __generator(this, function (_d) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var additionalHeaders, additionalQueryParams, queryParams, normalizedSearchRequests, normalizedQueryParams; + return tslib_1.__generator(this, function (_d) { additionalHeaders = {}; if (this.useTextContentType) { additionalHeaders["content-type"] = "text/plain"; @@ -4292,8 +3499,17 @@ var MultiSearch = /** @class */ (function () { if (this.configuration.useServerSideSearchCache === true) { additionalQueryParams["use_cache"] = true; } - queryParams = Object.assign({}, commonParams, additionalQueryParams); - return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })]; + queryParams = tslib_1.__assign(tslib_1.__assign({}, commonParams), additionalQueryParams); + normalizedSearchRequests = { + searches: searchRequests.searches.map(Utils_1.normalizeArrayableParams), + }; + normalizedQueryParams = (0, Utils_1.normalizeArrayableParams)(queryParams); + return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [ + RESOURCEPATH, + normalizedSearchRequests, + normalizedQueryParams, + additionalHeaders, + ], { cacheResponseForSeconds: cacheSearchResultsForSeconds })]; }); }); }; @@ -4308,47 +3524,12 @@ exports["default"] = MultiSearch; /*!************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Operations.js ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/operations"; var Operations = /** @class */ (function () { function Operations(apiCall) { @@ -4356,8 +3537,8 @@ var Operations = /** @class */ (function () { } Operations.prototype.perform = function (operationName, queryParameters) { if (queryParameters === void 0) { queryParameters = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.post("".concat(RESOURCEPATH, "/").concat(operationName), {}, queryParameters)]; }); }); @@ -4373,52 +3554,14 @@ exports["default"] = Operations; /*!**********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Override.js ***! \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Overrides_1 = __importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Overrides_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Overrides */ "./node_modules/typesense/lib/Typesense/Overrides.js")); var Override = /** @class */ (function () { function Override(collectionName, overrideId, apiCall) { this.collectionName = collectionName; @@ -4426,21 +3569,21 @@ var Override = /** @class */ (function () { this.apiCall = apiCall; } Override.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Override.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Override.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides_1.default.RESOURCEPATH, "/").concat(this.overrideId); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.collectionName)).concat(Overrides_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.overrideId)); }; return Override; }()); @@ -4453,51 +3596,13 @@ exports["default"] = Override; /*!***********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Overrides.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); var RESOURCEPATH = "/overrides"; var Overrides = /** @class */ (function () { function Overrides(collectionName, apiCall) { @@ -4505,21 +3610,21 @@ var Overrides = /** @class */ (function () { this.apiCall = apiCall; } Overrides.prototype.upsert = function (overrideId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.put(this.endpointPath(overrideId), params)]; }); }); }; Overrides.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Overrides.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + encodeURIComponent(operation)); }; Object.defineProperty(Overrides, "RESOURCEPATH", { get: function () { @@ -4539,72 +3644,34 @@ exports["default"] = Overrides; /*!********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Preset.js ***! \********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Presets_1 = __importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Presets_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Presets */ "./node_modules/typesense/lib/Typesense/Presets.js")); var Preset = /** @class */ (function () { function Preset(presetId, apiCall) { this.presetId = presetId; this.apiCall = apiCall; } Preset.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Preset.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Preset.prototype.endpointPath = function () { - return "".concat(Presets_1.default.RESOURCEPATH, "/").concat(this.presetId); + return "".concat(Presets_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.presetId)); }; return Preset; }()); @@ -4617,68 +3684,46 @@ exports["default"] = Preset; /*!*********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Presets.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Utils_1 = __webpack_require__(/*! ./Utils */ "./node_modules/typesense/lib/Typesense/Utils.js"); var RESOURCEPATH = "/presets"; var Presets = /** @class */ (function () { function Presets(apiCall) { this.apiCall = apiCall; } Presets.prototype.upsert = function (presetId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), params)]; + return tslib_1.__awaiter(this, void 0, void 0, function () { + var normalizedParams_1, normalizedParams; + return tslib_1.__generator(this, function (_a) { + if (typeof params.value === "object" && "searches" in params.value) { + normalizedParams_1 = params.value.searches.map(function (search) { + return (0, Utils_1.normalizeArrayableParams)(search); + }); + return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), { + value: { searches: normalizedParams_1 }, + })]; + } + normalizedParams = (0, Utils_1.normalizeArrayableParams)(params.value); + return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), { + value: normalizedParams, + })]; }); }); }; Presets.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Presets.prototype.endpointPath = function (operation) { - return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + encodeURIComponent(operation)); }; Object.defineProperty(Presets, "RESOURCEPATH", { get: function () { @@ -4698,56 +3743,12 @@ exports["default"] = Presets; /*!******************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/RequestWithCache.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var defaultCacheResponseForSeconds = 2 * 60; var defaultMaxSize = 100; var RequestWithCache = /** @class */ (function () { @@ -4761,15 +3762,15 @@ var RequestWithCache = /** @class */ (function () { }; // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) { - return __awaiter(this, void 0, void 0, function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry; - return __generator(this, function (_c) { + return tslib_1.__generator(this, function (_c) { switch (_c.label) { case 0: _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b; isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0; if (isCacheDisabled) { - return [2 /*return*/, requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))]; + return [2 /*return*/, requestFunction.call.apply(requestFunction, tslib_1.__spreadArray([requestContext], requestFunctionArguments, false))]; } requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments); cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON); @@ -4798,7 +3799,7 @@ var RequestWithCache = /** @class */ (function () { this.responsePromiseCache.delete(requestFunctionArgumentsJSON); } } - responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false)); + responsePromise = requestFunction.call.apply(requestFunction, tslib_1.__spreadArray([requestContext], requestFunctionArguments, false)); this.responsePromiseCache.set(requestFunctionArgumentsJSON, { requestTimestamp: now, responsePromise: responsePromise, @@ -4813,12 +3814,16 @@ var RequestWithCache = /** @class */ (function () { isCacheOverMaxSize = this.responseCache.size > maxSize; if (isCacheOverMaxSize) { oldestEntry = this.responseCache.keys().next().value; - this.responseCache.delete(oldestEntry); + if (oldestEntry) { + this.responseCache.delete(oldestEntry); + } } isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize; if (isResponsePromiseCacheOverMaxSize) { oldestEntry = this.responsePromiseCache.keys().next().value; - this.responsePromiseCache.delete(oldestEntry); + if (oldestEntry) { + this.responsePromiseCache.delete(oldestEntry); + } } return [2 /*return*/, response]; } @@ -4836,17 +3841,15 @@ exports["default"] = RequestWithCache; /*!**************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/SearchClient.js ***! \**************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Configuration_1 = __importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); -var ApiCall_1 = __importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); -var MultiSearch_1 = __importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Configuration_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Configuration */ "./node_modules/typesense/lib/Typesense/Configuration.js")); +var ApiCall_1 = tslib_1.__importDefault(__webpack_require__(/*! ./ApiCall */ "./node_modules/typesense/lib/Typesense/ApiCall.js")); +var MultiSearch_1 = tslib_1.__importDefault(__webpack_require__(/*! ./MultiSearch */ "./node_modules/typesense/lib/Typesense/MultiSearch.js")); var SearchOnlyCollection_1 = __webpack_require__(/*! ./SearchOnlyCollection */ "./node_modules/typesense/lib/Typesense/SearchOnlyCollection.js"); var SearchClient = /** @class */ (function () { function SearchClient(options) { @@ -4921,53 +3924,16 @@ exports.SearchOnlyCollection = SearchOnlyCollection; /*!*********************************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/SearchOnlyDocuments.js ***! \*********************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SearchOnlyDocuments = void 0; -var RequestWithCache_1 = __importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var RequestWithCache_1 = tslib_1.__importDefault(__webpack_require__(/*! ./RequestWithCache */ "./node_modules/typesense/lib/Typesense/RequestWithCache.js")); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Utils_1 = __webpack_require__(/*! ./Utils */ "./node_modules/typesense/lib/Typesense/Utils.js"); var RESOURCEPATH = "/documents"; var SearchOnlyDocuments = /** @class */ (function () { function SearchOnlyDocuments(collectionName, apiCall, configuration) { @@ -4982,19 +3948,15 @@ var SearchOnlyDocuments = /** @class */ (function () { SearchOnlyDocuments.prototype.search = function (searchParameters, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _c === void 0 ? this.configuration .cacheSearchResultsForSeconds : _c, _d = _b.abortSignal, abortSignal = _d === void 0 ? null : _d; - return __awaiter(this, void 0, void 0, function () { - var additionalQueryParams, key, queryParams; - return __generator(this, function (_e) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var additionalQueryParams, normalizedParams, queryParams; + return tslib_1.__generator(this, function (_e) { additionalQueryParams = {}; if (this.configuration.useServerSideSearchCache === true) { additionalQueryParams["use_cache"] = true; } - for (key in searchParameters) { - if (Array.isArray(searchParameters[key])) { - additionalQueryParams[key] = searchParameters[key].join(","); - } - } - queryParams = Object.assign({}, searchParameters, additionalQueryParams); + normalizedParams = (0, Utils_1.normalizeArrayableParams)(searchParameters); + queryParams = Object.assign({}, additionalQueryParams, normalizedParams); return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath("search"), queryParams, { abortSignal: abortSignal }], { cacheResponseForSeconds: cacheSearchResultsForSeconds, })]; @@ -5018,76 +3980,67 @@ exports.SearchOnlyDocuments = SearchOnlyDocuments; /***/ }), +/***/ "./node_modules/typesense/lib/Typesense/Stats.js": +/*!*******************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Stats.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var RESOURCEPATH = "/stats.json"; +var Metrics = /** @class */ (function () { + function Metrics(apiCall) { + this.apiCall = apiCall; + } + Metrics.prototype.retrieve = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, this.apiCall.get(RESOURCEPATH)]; + }); + }); + }; + return Metrics; +}()); +exports["default"] = Metrics; +//# sourceMappingURL=Stats.js.map + +/***/ }), + /***/ "./node_modules/typesense/lib/Typesense/Stopword.js": /*!**********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Stopword.js ***! \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Stopwords_1 = __importDefault(__webpack_require__(/*! ./Stopwords */ "./node_modules/typesense/lib/Typesense/Stopwords.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Stopwords_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Stopwords */ "./node_modules/typesense/lib/Typesense/Stopwords.js")); var Stopword = /** @class */ (function () { function Stopword(stopwordId, apiCall) { this.stopwordId = stopwordId; this.apiCall = apiCall; } Stopword.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Stopword.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Stopword.prototype.endpointPath = function () { - return "".concat(Stopwords_1.default.RESOURCEPATH, "/").concat(this.stopwordId); + return "".concat(Stopwords_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.stopwordId)); }; return Stopword; }()); @@ -5100,68 +4053,33 @@ exports["default"] = Stopword; /*!***********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Stopwords.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); var RESOURCEPATH = "/stopwords"; var Stopwords = /** @class */ (function () { function Stopwords(apiCall) { this.apiCall = apiCall; } Stopwords.prototype.upsert = function (stopwordId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.put(this.endpointPath(stopwordId), params)]; }); }); }; Stopwords.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Stopwords.prototype.endpointPath = function (operation) { - return "".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? "" : "/" + encodeURIComponent(operation)); }; Object.defineProperty(Stopwords, "RESOURCEPATH", { get: function () { @@ -5181,52 +4099,14 @@ exports["default"] = Stopwords; /*!*********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Synonym.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); -var Synonyms_1 = __importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var Synonyms_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Synonyms */ "./node_modules/typesense/lib/Typesense/Synonyms.js")); var Synonym = /** @class */ (function () { function Synonym(collectionName, synonymId, apiCall) { this.collectionName = collectionName; @@ -5234,21 +4114,21 @@ var Synonym = /** @class */ (function () { this.apiCall = apiCall; } Synonym.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Synonym.prototype.delete = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.delete(this.endpointPath())]; }); }); }; Synonym.prototype.endpointPath = function () { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms_1.default.RESOURCEPATH, "/").concat(this.synonymId); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.collectionName)).concat(Synonyms_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.synonymId)); }; return Synonym; }()); @@ -5261,51 +4141,13 @@ exports["default"] = Synonym; /*!**********************************************************!*\ !*** ./node_modules/typesense/lib/Typesense/Synonyms.js ***! \**********************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var Collections_1 = __importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Collections_1 = tslib_1.__importDefault(__webpack_require__(/*! ./Collections */ "./node_modules/typesense/lib/Typesense/Collections.js")); var RESOURCEPATH = "/synonyms"; var Synonyms = /** @class */ (function () { function Synonyms(collectionName, apiCall) { @@ -5313,21 +4155,21 @@ var Synonyms = /** @class */ (function () { this.apiCall = apiCall; } Synonyms.prototype.upsert = function (synonymId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.put(this.endpointPath(synonymId), params)]; }); }); }; Synonyms.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, this.apiCall.get(this.endpointPath())]; }); }); }; Synonyms.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(encodeURIComponent(this.collectionName)).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + encodeURIComponent(operation)); }; Object.defineProperty(Synonyms, "RESOURCEPATH", { get: function () { @@ -5343,6 +4185,47 @@ exports["default"] = Synonyms; /***/ }), +/***/ "./node_modules/typesense/lib/Typesense/Utils.js": +/*!*******************************************************!*\ + !*** ./node_modules/typesense/lib/Typesense/Utils.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeArrayableParams = void 0; +var tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs"); +var Documents_1 = __webpack_require__(/*! ./Documents */ "./node_modules/typesense/lib/Typesense/Documents.js"); +function hasNoArrayValues(params) { + return Object.keys(Documents_1.arrayableParams) + .filter(function (key) { return params[key] !== undefined; }) + .every(function (key) { return isNonArrayValue(params[key]); }); +} +function normalizeArrayableParams(params) { + var result = tslib_1.__assign({}, params); + var transformedValues = Object.keys(Documents_1.arrayableParams) + .filter(function (key) { return Array.isArray(result[key]); }) + .map(function (key) { + result[key] = result[key].join(","); + return key; + }); + if (!transformedValues.length && hasNoArrayValues(result)) { + return result; + } + if (!hasNoArrayValues(result)) { + throw new Error("Failed to normalize arrayable params: ".concat(JSON.stringify(result))); + } + return result; +} +exports.normalizeArrayableParams = normalizeArrayableParams; +function isNonArrayValue(value) { + return !Array.isArray(value); +} +//# sourceMappingURL=Utils.js.map + +/***/ }), + /***/ "?6884": /*!************************!*\ !*** crypto (ignored) ***! @@ -5353,6 +4236,26 @@ exports["default"] = Synonyms; /***/ }), +/***/ "?92a5": +/*!**********************!*\ + !*** http (ignored) ***! + \**********************/ +/***/ (() => { + +/* (ignored) */ + +/***/ }), + +/***/ "?ba77": +/*!***********************!*\ + !*** https (ignored) ***! + \***********************/ +/***/ (() => { + +/* (ignored) */ + +/***/ }), + /***/ "./node_modules/@babel/runtime/helpers/regeneratorRuntime.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! @@ -9947,6 +8850,454 @@ function _unsupportedIterableToArray(o, minLen) { if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen); } +/***/ }), + +/***/ "./node_modules/typesense/node_modules/tslib/tslib.es6.mjs": +/*!*****************************************************************!*\ + !*** ./node_modules/typesense/node_modules/tslib/tslib.es6.mjs ***! + \*****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource), +/* harmony export */ __assign: () => (/* binding */ __assign), +/* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator), +/* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator), +/* harmony export */ __asyncValues: () => (/* binding */ __asyncValues), +/* harmony export */ __await: () => (/* binding */ __await), +/* harmony export */ __awaiter: () => (/* binding */ __awaiter), +/* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet), +/* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn), +/* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet), +/* harmony export */ __createBinding: () => (/* binding */ __createBinding), +/* harmony export */ __decorate: () => (/* binding */ __decorate), +/* harmony export */ __disposeResources: () => (/* binding */ __disposeResources), +/* harmony export */ __esDecorate: () => (/* binding */ __esDecorate), +/* harmony export */ __exportStar: () => (/* binding */ __exportStar), +/* harmony export */ __extends: () => (/* binding */ __extends), +/* harmony export */ __generator: () => (/* binding */ __generator), +/* harmony export */ __importDefault: () => (/* binding */ __importDefault), +/* harmony export */ __importStar: () => (/* binding */ __importStar), +/* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject), +/* harmony export */ __metadata: () => (/* binding */ __metadata), +/* harmony export */ __param: () => (/* binding */ __param), +/* harmony export */ __propKey: () => (/* binding */ __propKey), +/* harmony export */ __read: () => (/* binding */ __read), +/* harmony export */ __rest: () => (/* binding */ __rest), +/* harmony export */ __rewriteRelativeImportExtension: () => (/* binding */ __rewriteRelativeImportExtension), +/* harmony export */ __runInitializers: () => (/* binding */ __runInitializers), +/* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName), +/* harmony export */ __spread: () => (/* binding */ __spread), +/* harmony export */ __spreadArray: () => (/* binding */ __spreadArray), +/* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays), +/* harmony export */ __values: () => (/* binding */ __values), +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; + +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; + +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +}; + +function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +function __classPrivateFieldIn(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} + +function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +} + +var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} + +function __rewriteRelativeImportExtension(path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __extends, + __assign, + __rest, + __decorate, + __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources, + __rewriteRelativeImportExtension, +}); + + /***/ }) /******/ }); @@ -10047,7 +9398,6 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _Configuration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Configuration */ "./src/Configuration.js"); /* harmony import */ var typesense__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! typesense */ "./node_modules/typesense/lib/Typesense.js"); -/* harmony import */ var typesense__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(typesense__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _SearchRequestAdapter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SearchRequestAdapter */ "./src/SearchRequestAdapter.js"); /* harmony import */ var _SearchResponseAdapter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SearchResponseAdapter */ "./src/SearchResponseAdapter.js"); /* harmony import */ var _FacetSearchResponseAdapter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FacetSearchResponseAdapter */ "./src/FacetSearchResponseAdapter.js"); diff --git a/dist/typesense-instantsearch-adapter.js.map b/dist/typesense-instantsearch-adapter.js.map index 5e3eefb..d755829 100644 --- a/dist/typesense-instantsearch-adapter.js.map +++ b/dist/typesense-instantsearch-adapter.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense-instantsearch-adapter.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;ACVa;;AAAA;AAAA;AAEN,IAAME,aAAa;EACxB,SAAAA,cAAA,EAA0B;IAAA,IAAAC,qBAAA;MAAAC,qBAAA;MAAAC,IAAA;MAAAC,qBAAA;MAAAC,KAAA;MAAAC,sBAAA;MAAAC,KAAA;MAAAC,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;IAE7F,IAAI,CAACgC,0BAA0B,IAAA/B,qBAAA,GAAGoB,OAAO,CAACW,0BAA0B,cAAA/B,qBAAA,cAAA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;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,CA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C;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;AAC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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,8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C9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uCAAuC,mBAAO,CAAC,yFAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;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oD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ha;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sCAAsC,mBAAO,CAAC,gFAAiB;AAC/D,gCAAgC,mBAAO,CAAC,oEAAW;AACnD,oCAAoC,mBAAO,CAAC,4EAAe;AAC3D,6BAA6B,mBAAO,CAAC,8FAAwB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;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,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;AAC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,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 != null) {\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 +{"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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C,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,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,GAAG,oBAAoB,GAAG,cAAc;AACtD,cAAc,mBAAO,CAAC,wEAAO;AAC7B,uCAAuC,mBAAO,CAAC,4EAAoB;AACnE,cAAc;AACd,6CAA6C,mBAAO,CAAC,wFAA0B;AAC/E,oBAAoB;AACpB,kCAAkC,mBAAO,CAAC,kFAAoB;AAC9D,cAAc;AACd,kBAAe,KAAK;AACpB;;;;;;;;;;;ACXa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,wCAAwC,mBAAO,CAAC,oEAAW;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;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;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,+CAA+C,mBAAO,CAAC,kFAAkB;AACzE,8CAA8C,mBAAO,CAAC,gFAAiB;AACvE,gDAAgD,mBAAO,CAAC,oFAAmB;AAC3E;AACA;AACA;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,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACvCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,+CAA+C,mBAAO,CAAC,kFAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;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;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,sCAAsC,mBAAO,CAAC,0DAAO;AACrD,aAAa,mBAAO,CAAC,mBAAM;AAC3B,cAAc,mBAAO,CAAC,oBAAO;AAC7B,eAAe,mBAAO,CAAC,wEAAU;AACjC,+CAA+C,mBAAO,CAAC,gGAAyB;AAChF;AACA;AACA;AACA;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;AACA,oEAAoE,gEAAgE;AACpI;AACA;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,8FAA8F,iBAAiB;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG,iBAAiB;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oEAAoE,gEAAgE;AACpI;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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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,4CAA4C,mBAAO,CAAC,4EAAe;AACnE,0CAA0C,mBAAO,CAAC,wEAAa;AAC/D,eAAe,mBAAO,CAAC,wEAAU;AACjC,0CAA0C,mBAAO,CAAC,wEAAa;AAC/D,yCAAyC,mBAAO,CAAC,sEAAY;AAC7D,yCAAyC,mBAAO,CAAC,sEAAY;AAC7D,wCAAwC,mBAAO,CAAC,oEAAW;AAC3D,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,kCAAkC;AAClC;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;;;;;;;;;;;AC5Ga;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,kCAAkC,mBAAO,CAAC,yDAAU;AACpD,eAAe,mBAAO,CAAC,wEAAU;AACjC;AACA;AACA;AACA;AACA;AACA,mCAAmC,0CAA0C;AAC7E,mCAAmC,0CAA0C;AAC7E,mCAAmC,2BAA2B,WAAW,GAAG;AAC5E;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;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;;;;;;;;;;;AChHa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,8CAA8C,mBAAO,CAAC,gFAAiB;AACvE;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;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,mDAAmD,mBAAO,CAAC,0FAAsB;AACjF;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;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;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;;;;;;;;;;;ACpCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,mDAAmD,mBAAO,CAAC,0FAAsB;AACjF,kDAAkD,mBAAO,CAAC,wFAAqB;AAC/E;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;;;;;;;;;;;ACzCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,cAAc,mBAAO,CAAC,wEAAO;AAC7B,4CAA4C,mBAAO,CAAC,4EAAe;AACnE,0CAA0C,mBAAO,CAAC,wEAAa;AAC/D;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,kCAAkC;AAClC;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;AAChB;;;;;;;;;;;ACxCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,cAAc,mBAAO,CAAC,wEAAO;AAC7B,eAAe,mBAAO,CAAC,wEAAU;AACjC,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA,iDAAiD,8BAA8B;AAC/E;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,gDAAgD,uBAAuB;AACvE,gFAAgF,6BAA6B;AAC7G;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;;;;;;;;;;;ACvMa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,+CAA+C,mBAAO,CAAC,yFAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACZa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,+CAA+C,mBAAO,CAAC,yFAAkB;AACzE;AACA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,mBAAO,CAAC,wEAAO;AAC7B,qCAAqC,mBAAO,CAAC,8DAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,eAAe,mBAAO,CAAC,qBAAQ;AAC/B,cAAc,mBAAO,CAAC,gEAAS;AAC/B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,iDAAiD,mBAAO,CAAC,sFAAoB;AAC7E,cAAc,mBAAO,CAAC,gEAAS;AAC/B;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uDAAuD;AAChF,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACjDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,8GAA8G;AAC9G,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACnBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,4CAA4C,mBAAO,CAAC,4EAAe;AACnE,0CAA0C,mBAAO,CAAC,wEAAa;AAC/D;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,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,4CAA4C,mBAAO,CAAC,4EAAe;AACnE;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;;;;;;;;;;;ACrCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,wCAAwC,mBAAO,CAAC,oEAAW;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,cAAc,mBAAO,CAAC,gEAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qCAAqC,8BAA8B;AACnE,yBAAyB;AACzB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,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;;;;;;;;;;;AChDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;ACvFa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,8CAA8C,mBAAO,CAAC,gFAAiB;AACvE,wCAAwC,mBAAO,CAAC,oEAAW;AAC3D,4CAA4C,mBAAO,CAAC,4EAAe;AACnE,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;;;;;;;;;;;AC5Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,4BAA4B,mBAAO,CAAC,4FAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,4BAA4B;AAC5B;;;;;;;;;;;ACjBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,cAAc,mBAAO,CAAC,wEAAO;AAC7B,iDAAiD,mBAAO,CAAC,sFAAoB;AAC7E,4CAA4C,mBAAO,CAAC,4EAAe;AACnE,cAAc,mBAAO,CAAC,gEAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,iJAAiJ,0BAA0B;AAC3K;AACA,qBAAqB;AACrB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,2BAA2B;AAC3B;;;;;;;;;;;ACjDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AClBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,0CAA0C,mBAAO,CAAC,wEAAa;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,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B;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;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,4CAA4C,mBAAO,CAAC,4EAAe;AACnE,yCAAyC,mBAAO,CAAC,sEAAY;AAC7D;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,CAAC;AACD,kBAAe;AACf;;;;;;;;;;;AC/Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,wEAAO;AAC7B,4CAA4C,mBAAO,CAAC,4EAAe;AACnE;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;;;;;;;;;;;ACrCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gCAAgC;AAChC,cAAc,mBAAO,CAAC,wEAAO;AAC7B,kBAAkB,mBAAO,CAAC,wEAAa;AACvC;AACA;AACA,iCAAiC,mCAAmC;AACpE,gCAAgC,sCAAsC;AACtE;AACA;AACA,oCAAoC;AACpC;AACA,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;;;;;;;;;;AC9BA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;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;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,gBAAgB,sCAAsC,kBAAkB;AACjF,wBAAwB;AACxB;AACA;;AAEO;AACP;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEO;AACP;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;;AAEO;AACP,kCAAkC;AAClC;;AAEO;AACP,uBAAuB,uFAAuF;AAC9G;AACA;AACA,yGAAyG;AACzG;AACA,sCAAsC,QAAQ;AAC9C;AACA,gEAAgE;AAChE;AACA,8CAA8C,yFAAyF;AACvI,8DAA8D,2CAA2C;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA,4CAA4C,y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AY;AAC7D,qBAAqB;AACrB,4BAA4B;AAC5B,2BAA2B;AAC3B,0BAA0B;AAC1B;;AAEO;AACP;AACA,eAAe,6CAA6C,UAAU,sDAAsD,cAAc;AAC1I,wBAAwB,6BAA6B,oBAAoB,uCAAuC,kBAAkB;AAClI;;AAEO;AACP;AACA;AACA,yGAAyG,uFAAuF,cAAc;AAC9M,qBAAqB,8BAA8B,gDAAgD,wDAAwD;AAC3J,2CAA2C,sCAAsC,UAAU,mBAAmB,IAAI;AAClH;;AAEO;AACP,+BAA+B,uCAAuC,YAAY,KAAK,OAAO;AAC9F;AACA;;AAEA;AACA,wCAAwC,4BAA4B;AACpE,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;;AAEO;AACP,2CAA2C;AAC3C;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,MAAM,oBAAoB,YAAY;AAC5E,qBAAqB,8CAA8C;AACnE;AACA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,SAAS,gBAAgB;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,EAAC;;;;;;;UChZF;UACA;;UAEA;UACA;UACA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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/AnalyticsEvents.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/Stats.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/typesense/lib/Typesense/Utils.js","webpack://TypesenseInstantSearchAdapter/ignored|/home/fanis/code/instantsearch-adapter/node_modules/typesense/lib/Typesense|crypto","webpack://TypesenseInstantSearchAdapter/ignored|/home/fanis/code/instantsearch-adapter/node_modules/typesense/lib/Typesense|http","webpack://TypesenseInstantSearchAdapter/ignored|/home/fanis/code/instantsearch-adapter/node_modules/typesense/lib/Typesense|https","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/./node_modules/typesense/node_modules/tslib/tslib.es6.mjs","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 != null) {\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Client_1 = tslib_1.__importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = tslib_1.__importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Aliases_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.name));\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar AnalyticsRules_1 = tslib_1.__importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = tslib_1.__importDefault(require(\"./AnalyticsRule\"));\nvar AnalyticsEvents_1 = tslib_1.__importDefault(require(\"./AnalyticsEvents\"));\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 this._analyticsEvents = new AnalyticsEvents_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 Analytics.prototype.events = function () {\n return this._analyticsEvents;\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/analytics/events\";\nvar AnalyticsEvents = /** @class */ (function () {\n function AnalyticsEvents(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsEvents.prototype.create = function (params) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n AnalyticsEvents.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsEvents.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + encodeURIComponent(operation));\n };\n Object.defineProperty(AnalyticsEvents, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsEvents;\n}());\nexports.default = AnalyticsEvents;\n//# sourceMappingURL=AnalyticsEvents.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar AnalyticsRules_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.name));\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar axios_1 = tslib_1.__importDefault(require(\"axios\"));\nvar http_1 = require(\"http\");\nvar https_1 = require(\"https\");\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar isNodeJSEnvironment = typeof process !== \"undefined\" &&\n process.versions != null &&\n process.versions.node != null;\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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, _e;\n var _f = _a.queryParameters, queryParameters = _f === void 0 ? null : _f, _g = _a.bodyParameters, bodyParameters = _g === void 0 ? null : _g, _h = _a.additionalHeaders, additionalHeaders = _h === void 0 ? {} : _h, _j = _a.abortSignal, abortSignal = _j === void 0 ? null : _j, _k = _a.responseType, responseType = _k === void 0 ? undefined : _k, _l = _a.skipConnectionTimeout, skipConnectionTimeout = _l === void 0 ? false : _l, _m = _a.enableKeepAlive, enableKeepAlive = _m === void 0 ? undefined : _m;\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, wasAborted, _loop_1, this_1, numTries, state_1;\n return tslib_1.__generator(this, function (_o) {\n switch (_o.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n wasAborted = false;\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 tslib_1.__generator(this, function (_p) {\n switch (_p.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 _p.label = 1;\n case 1:\n _p.trys.push([1, 3, 5, 6]);\n requestOptions = {\n adapter: this_1.configuration.axiosAdapter,\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 else if (enableKeepAlive === true) {\n if (!isNodeJSEnvironment) {\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Cannot use custom httpAgent in a browser environment to enable keepAlive\"));\n }\n else {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Enabling KeepAlive\"));\n requestOptions.httpAgent = new http_1.Agent({ keepAlive: true });\n }\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 else if (enableKeepAlive === true) {\n if (!isNodeJSEnvironment) {\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Cannot use custom httpAgent in a browser environment to enable keepAlive\"));\n }\n else {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Enabling keepAlive\"));\n requestOptions.httpsAgent = new https_1.Agent({ keepAlive: true });\n }\n }\n if (this_1.configuration.paramsSerializer) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom paramsSerializer\"));\n requestOptions.paramsSerializer = this_1.configuration.paramsSerializer;\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 () {\n wasAborted = true;\n source_1.cancel();\n };\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 = _p.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 = _p.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n if (!wasAborted) {\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n }\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat((_d = error_1 === null || error_1 === void 0 ? void 0 : error_1.code) !== null && _d !== void 0 ? _d : \"\", \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_e = error_1.response) === null || _e === void 0 ? void 0 : _e.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n if (wasAborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n if (numTries < this_1.numRetriesPerRequest + 1) {\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n }\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _p.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 _o.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 = _o.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _o.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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Configuration_1 = tslib_1.__importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = tslib_1.__importDefault(require(\"./ApiCall\"));\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Collection_1 = tslib_1.__importDefault(require(\"./Collection\"));\nvar Aliases_1 = tslib_1.__importDefault(require(\"./Aliases\"));\nvar Alias_1 = tslib_1.__importDefault(require(\"./Alias\"));\nvar Keys_1 = tslib_1.__importDefault(require(\"./Keys\"));\nvar Key_1 = tslib_1.__importDefault(require(\"./Key\"));\nvar Debug_1 = tslib_1.__importDefault(require(\"./Debug\"));\nvar Metrics_1 = tslib_1.__importDefault(require(\"./Metrics\"));\nvar Stats_1 = tslib_1.__importDefault(require(\"./Stats\"));\nvar Health_1 = tslib_1.__importDefault(require(\"./Health\"));\nvar Operations_1 = tslib_1.__importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = tslib_1.__importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = tslib_1.__importDefault(require(\"./Presets\"));\nvar Preset_1 = tslib_1.__importDefault(require(\"./Preset\"));\nvar Analytics_1 = tslib_1.__importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = tslib_1.__importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = tslib_1.__importDefault(require(\"./Stopword\"));\nvar Conversations_1 = tslib_1.__importDefault(require(\"./Conversations\"));\nvar Conversation_1 = tslib_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.stats = new Stats_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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Documents_1 = tslib_1.__importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = tslib_1.__importDefault(require(\"./Overrides\"));\nvar Override_1 = tslib_1.__importDefault(require(\"./Override\"));\nvar Synonyms_1 = tslib_1.__importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function (options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), options)];\n });\n });\n };\n Collection.prototype.exists = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var e_1;\n return tslib_1.__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(encodeURIComponent(this.name));\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function (options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH, options)];\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar logger = tslib_1.__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 (tslib_1.__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 !== undefined && options.numRetries >= 0\n ? options.numRetries\n : this.nodes.length + (this.nearestNode == null ? 0 : 1)) || 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.axiosAdapter = options.axiosAdapter;\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.paramsSerializer = options.paramsSerializer;\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Conversations_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.id));\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar ConversationModels_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.id));\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar ConversationModels_1 = tslib_1.__importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Documents_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function (options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), options)];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(encodeURIComponent(this.documentId));\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arrayableParams = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nexports.arrayableParams = {\n query_by: \"query_by\",\n query_by_weights: \"query_by_weights\",\n facet_by: \"facet_by\",\n group_by: \"group_by\",\n include_fields: \"include_fields\",\n exclude_fields: \"exclude_fields\",\n highlight_fields: \"highlight_fields\",\n highlight_full_fields: \"highlight_full_fields\",\n pinned_hits: \"pinned_hits\",\n hidden_hits: \"hidden_hits\",\n infix: \"infix\",\n override_tags: \"override_tags\",\n num_typos: \"num_typos\",\n prefix: \"prefix\",\n sort_by: \"sort_by\",\n};\nvar isNodeJSEnvironment = typeof process !== \"undefined\" &&\n process.versions != null &&\n process.versions.node != null;\nvar Documents = /** @class */ (function (_super) {\n tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return tslib_1.__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 (error instanceof RangeError &&\n error.message.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 enableKeepAlive: isNodeJSEnvironment ? true : false, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\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 * Imports documents from a NodeJS readable stream of JSONL.\n */\n Documents.prototype.importStream = function (readableStream, options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: readableStream,\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 enableKeepAlive: isNodeJSEnvironment ? true : false, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\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 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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError = /** @class */ (function (_super) {\n tslib_1.__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\";\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 tslib_1 = require(\"tslib\");\nvar HTTPError_1 = tslib_1.__importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = tslib_1.__importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = tslib_1.__importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = tslib_1.__importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = tslib_1.__importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = tslib_1.__importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = tslib_1.__importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = tslib_1.__importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = tslib_1.__importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Keys_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.id));\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar crypto_1 = require(\"crypto\");\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 normalizedParams = (0, Utils_1.normalizeArrayableParams)(parameters);\n var paramsJSON = JSON.stringify(normalizedParams);\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RequestWithCache_1 = tslib_1.__importDefault(require(\"./RequestWithCache\"));\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams, normalizedSearchRequests, normalizedQueryParams;\n return tslib_1.__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 = tslib_1.__assign(tslib_1.__assign({}, commonParams), additionalQueryParams);\n normalizedSearchRequests = {\n searches: searchRequests.searches.map(Utils_1.normalizeArrayableParams),\n };\n normalizedQueryParams = (0, Utils_1.normalizeArrayableParams)(queryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [\n RESOURCEPATH,\n normalizedSearchRequests,\n normalizedQueryParams,\n additionalHeaders,\n ], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Overrides_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(encodeURIComponent(this.overrideId));\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Presets_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.presetId));\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var normalizedParams_1, normalizedParams;\n return tslib_1.__generator(this, function (_a) {\n if (typeof params.value === \"object\" && \"searches\" in params.value) {\n normalizedParams_1 = params.value.searches.map(function (search) {\n return (0, Utils_1.normalizeArrayableParams)(search);\n });\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), {\n value: { searches: normalizedParams_1 },\n })];\n }\n normalizedParams = (0, Utils_1.normalizeArrayableParams)(params.value);\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), {\n value: normalizedParams,\n })];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__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 tslib_1.__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, tslib_1.__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, tslib_1.__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 if (oldestEntry) {\n this.responseCache.delete(oldestEntry);\n }\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n if (oldestEntry) {\n this.responsePromiseCache.delete(oldestEntry);\n }\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Configuration_1 = tslib_1.__importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = tslib_1.__importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = tslib_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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar tslib_1 = require(\"tslib\");\nvar RequestWithCache_1 = tslib_1.__importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, normalizedParams, queryParams;\n return tslib_1.__generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n normalizedParams = (0, Utils_1.normalizeArrayableParams)(searchParameters);\n queryParams = Object.assign({}, additionalQueryParams, normalizedParams);\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/stats.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Stats.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Stopwords_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.stopwordId));\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Synonyms_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(encodeURIComponent(this.synonymId));\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + encodeURIComponent(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","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizeArrayableParams = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Documents_1 = require(\"./Documents\");\nfunction hasNoArrayValues(params) {\n return Object.keys(Documents_1.arrayableParams)\n .filter(function (key) { return params[key] !== undefined; })\n .every(function (key) { return isNonArrayValue(params[key]); });\n}\nfunction normalizeArrayableParams(params) {\n var result = tslib_1.__assign({}, params);\n var transformedValues = Object.keys(Documents_1.arrayableParams)\n .filter(function (key) { return Array.isArray(result[key]); })\n .map(function (key) {\n result[key] = result[key].join(\",\");\n return key;\n });\n if (!transformedValues.length && hasNoArrayValues(result)) {\n return result;\n }\n if (!hasNoArrayValues(result)) {\n throw new Error(\"Failed to normalize arrayable params: \".concat(JSON.stringify(result)));\n }\n return result;\n}\nexports.normalizeArrayableParams = normalizeArrayableParams;\nfunction isNonArrayValue(value) {\n return !Array.isArray(value);\n}\n//# sourceMappingURL=Utils.js.map","/* (ignored) */","/* (ignored) */","/* (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}","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar 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\nexport function __extends(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\nexport var __assign = function() {\n __assign = Object.assign || function __assign(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)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __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});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(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}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.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 5e6ad69..dfa77b0 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: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})())); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TypesenseInstantSearchAdapter=t():e.TypesenseInstantSearchAdapter=t()}(self,(()=>(()=>{var e={3065:function(e,t,n){var r,o;!function(i,a){"use strict";r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,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(t,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(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(e){}}}(n),a.call(s,n,e),typeof console===t&&n{"use strict";t._t=void 0;var r=n(3301),o=r.__importDefault(n(5641));o.default;var i=r.__importDefault(n(8557));t._t=i.default;r.__importStar(n(4410));o.default,i.default},5300:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(612)),i=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}();t.default=i},612:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o="/aliases",i=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(o)]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH,"/").concat(encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return o},enumerable:!1,configurable:!0}),e}();t.default=i},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(9813)),i=r.__importDefault(n(3614)),a=r.__importDefault(n(4145)),s=function(){function e(e){this.apiCall=e,this.individualAnalyticsRules={},this.apiCall=e,this._analyticsRules=new o.default(this.apiCall),this._analyticsEvents=new a.default(this.apiCall)}return e.prototype.rules=function(e){return void 0===e?this._analyticsRules:(void 0===this.individualAnalyticsRules[e]&&(this.individualAnalyticsRules[e]=new i.default(e,this.apiCall)),this.individualAnalyticsRules[e])},e.prototype.events=function(){return this._analyticsEvents},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics"},enumerable:!1,configurable:!0}),e}();t.default=s},4145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.post(this.endpointPath(),e)]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics/events"},enumerable:!1,configurable:!0}),e}();t.default=o},3614:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(9813)),i=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}();t.default=i},9813:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.upsert=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics/rules"},enumerable:!1,configurable:!0}),e}();t.default=o},5996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(6425)),i=n(5978),a=n(7205),s=n(4410),u=r.__importDefault(n(7796)),c=!0,l="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,d=function(){function e(e){this.configuration=e,this.apiKey=this.configuration.apiKey,this.nodes=null==this.configuration.nodes?this.configuration.nodes:JSON.parse(JSON.stringify(this.configuration.nodes)),this.nearestNode=null==this.configuration.nearestNode?this.configuration.nearestNode:JSON.parse(JSON.stringify(this.configuration.nearestNode)),this.connectionTimeoutSeconds=this.configuration.connectionTimeoutSeconds,this.healthcheckIntervalSeconds=this.configuration.healthcheckIntervalSeconds,this.numRetriesPerRequest=this.configuration.numRetries,this.retryIntervalSeconds=this.configuration.retryIntervalSeconds,this.sendApiKeyAsQueryParam=this.configuration.sendApiKeyAsQueryParam,this.additionalUserHeaders=this.configuration.additionalHeaders,this.logger=this.configuration.logger,this.initializeMetadataForNodes(),this.currentNodeIndex=-1}return e.prototype.get=function(e,t,n){void 0===t&&(t={});var o=void 0===n?{}:n,i=o.abortSignal,a=void 0===i?null:i,s=o.responseType,u=void 0===s?void 0:s;return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.performRequest("get",e,{queryParameters:t,abortSignal:a,responseType:u})]}))}))},e.prototype.delete=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.performRequest("delete",e,{queryParameters:t})]}))}))},e.prototype.post=function(e,t,n,o){return void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,this.performRequest("post",e,{queryParameters:n,bodyParameters:t,additionalHeaders:o})]}))}))},e.prototype.put=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,this.performRequest("put",e,{queryParameters:n,bodyParameters:t})]}))}))},e.prototype.patch=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,this.performRequest("patch",e,{queryParameters:n,bodyParameters:t})]}))}))},e.prototype.performRequest=function(e,t,n){var s,u,d,f,h=n.queryParameters,p=void 0===h?null:h,y=n.bodyParameters,v=void 0===y?null:y,m=n.additionalHeaders,_=void 0===m?{}:m,g=n.abortSignal,b=void 0===g?null:g,w=n.responseType,O=void 0===w?void 0:w,P=n.skipConnectionTimeout,S=void 0!==P&&P,R=n.enableKeepAlive,C=void 0===R?void 0:R;return r.__awaiter(this,void 0,void 0,(function(){var n,h,y,m,g,w,P;return r.__generator(this,(function(R){switch(R.label){case 0:this.configuration.validate(),n=Date.now(),y=!1,this.logger.debug("Request #".concat(n,": Performing ").concat(e.toUpperCase()," request: ").concat(t)),m=function(m){var w,P,R,E,j,T,A;return r.__generator(this,(function(r){switch(r.label){case 0:if(w=g.getNextNode(n),g.logger.debug("Request #".concat(n,": Attempting ").concat(e.toUpperCase()," request Try #").concat(m," to Node ").concat(w.index)),b&&b.aborted)return[2,{value:Promise.reject(new Error("Request aborted by caller."))}];P=void 0,r.label=1;case 1:return r.trys.push([1,3,5,6]),R={adapter:g.configuration.axiosAdapter,method:e,url:g.uriFor(t,w),headers:Object.assign({},g.defaultHeaders(),_,g.additionalUserHeaders),maxContentLength:1/0,maxBodyLength:1/0,responseType:O,validateStatus:function(e){return e>0},transformResponse:[function(e,t){var n=e;return void 0!==t&&"string"==typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(n=JSON.parse(e)),n}]},!0!==S&&(R.timeout=1e3*g.connectionTimeoutSeconds),p&&0!==Object.keys(p).length&&(R.params=p),g.sendApiKeyAsQueryParam&&(R.params=R.params||{},R.params["x-typesense-api-key"]=g.apiKey),g.configuration.httpAgent?(g.logger.debug("Request #".concat(n,": Using custom httpAgent")),R.httpAgent=g.configuration.httpAgent):!0===C&&(l?(g.logger.debug("Request #".concat(n,": Enabling KeepAlive")),R.httpAgent=new i.Agent({keepAlive:!0})):g.logger.warn("Request #".concat(n,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),g.configuration.httpsAgent?(g.logger.debug("Request #".concat(n,": Using custom httpsAgent")),R.httpsAgent=g.configuration.httpsAgent):!0===C&&(l?(g.logger.debug("Request #".concat(n,": Enabling keepAlive")),R.httpsAgent=new a.Agent({keepAlive:!0})):g.logger.warn("Request #".concat(n,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),g.configuration.paramsSerializer&&(g.logger.debug("Request #".concat(n,": Using custom paramsSerializer")),R.paramsSerializer=g.configuration.paramsSerializer),v&&("string"==typeof v&&0!==v.length||"object"==typeof v&&0!==Object.keys(v).length)&&(R.data=v),b&&(E=o.default.CancelToken,j=E.source(),P=function(){y=!0,j.cancel()},b.addEventListener("abort",P),R.cancelToken=j.token),[4,(0,o.default)(R)];case 2:if((T=r.sent()).status>=1&&T.status<=499&&g.setNodeHealthcheck(w,c),g.logger.debug("Request #".concat(n,": Request to Node ").concat(w.index," was made. Response Code was ").concat(T.status,".")),T.status>=200&&T.status<300)return[2,{value:Promise.resolve(T.data)}];if(T.status<500)return[2,{value:Promise.reject(g.customErrorForResponse(T,null===(s=T.data)||void 0===s?void 0:s.message))}];throw g.customErrorForResponse(T,null===(u=T.data)||void 0===u?void 0:u.message);case 3:return A=r.sent(),y||g.setNodeHealthcheck(w,!1),h=A,g.logger.warn("Request #".concat(n,": Request to Node ").concat(w.index,' failed due to "').concat(null!==(d=null==A?void 0:A.code)&&void 0!==d?d:""," ").concat(A.message).concat(null==A.response?"":" - "+JSON.stringify(null===(f=A.response)||void 0===f?void 0:f.data),'"')),y?[2,{value:Promise.reject(new Error("Request aborted by caller."))}]:(m1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,c)),this.nodes.forEach((function(t,n){t.index=n,e.setNodeHealthcheck(t,c)}))},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e["X-TYPESENSE-API-KEY"]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,1e3*e)}))]}))}))},e.prototype.customErrorForResponse=function(e,t){var n="Request failed with HTTP code ".concat(e.status);"string"==typeof t&&""!==t.trim()&&(n+=" | Server said: ".concat(t));var r=new u.default(n);return(r=400===e.status?new s.RequestMalformed(n):401===e.status?new s.RequestUnauthorized(n):404===e.status?new s.ObjectNotFound(n):409===e.status?new s.ObjectAlreadyExists(n):422===e.status?new s.ObjectUnprocessable(n):e.status>=500&&e.status<=599?new s.ServerError(n):new s.HTTPError(n)).httpStatus=e.status,r},e}();t.default=d},5641:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(5706)),i=r.__importDefault(n(5996)),a=r.__importDefault(n(7361)),s=r.__importDefault(n(2626)),u=r.__importDefault(n(612)),c=r.__importDefault(n(5300)),l=r.__importDefault(n(326)),d=r.__importDefault(n(2275)),f=r.__importDefault(n(3343)),h=r.__importDefault(n(657)),p=r.__importDefault(n(4955)),y=r.__importDefault(n(8231)),v=r.__importDefault(n(3684)),m=r.__importDefault(n(8621)),_=r.__importDefault(n(5156)),g=r.__importDefault(n(3777)),b=r.__importDefault(n(800)),w=r.__importDefault(n(3533)),O=r.__importDefault(n(4646)),P=r.__importDefault(n(8700)),S=r.__importDefault(n(8313)),R=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!==(t=e.sendApiKeyAsQueryParam)&&void 0!==t&&t,this.configuration=new o.default(e),this.apiCall=new i.default(this.configuration),this.debug=new f.default(this.apiCall),this.metrics=new h.default(this.apiCall),this.stats=new p.default(this.apiCall),this.health=new y.default(this.apiCall),this.operations=new v.default(this.apiCall),this.multiSearch=new m.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 _.default(this.apiCall),this.individualPresets={},this._stopwords=new w.default(this.apiCall),this.individualStopwords={},this.analytics=new b.default(this.apiCall),this._conversations=new P.default(this.apiCall),this.individualConversations={}}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new c.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new d.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new g.default(e,this.apiCall)),this.individualPresets[e])},e.prototype.stopwords=function(e){return void 0===e?this._stopwords:(void 0===this.individualStopwords[e]&&(this.individualStopwords[e]=new O.default(e,this.apiCall)),this.individualStopwords[e])},e.prototype.conversations=function(e){return void 0===e?this._conversations:(void 0===this.individualConversations[e]&&(this.individualConversations[e]=new S.default(e,this.apiCall)),this.individualConversations[e])},e}();t.default=R},2626:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(7361)),i=r.__importDefault(n(9078)),a=n(4410),s=r.__importDefault(n(3629)),u=r.__importDefault(n(6582)),c=r.__importDefault(n(1104)),l=r.__importDefault(n(6821)),d=n(9459),f=function(){function e(e,t,n){this.name=e,this.apiCall=t,this.configuration=n,this.individualDocuments={},this.individualOverrides={},this.individualSynonyms={},this.name=e,this.apiCall=t,this.configuration=n,this._documents=new i.default(this.name,this.apiCall,this.configuration),this._overrides=new s.default(this.name,this.apiCall),this._synonyms=new c.default(this.name,this.apiCall)}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.update=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.patch(this.endpointPath(),e)]}))}))},e.prototype.delete=function(e){return void 0===e&&(e={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]}))}))},e.prototype.exists=function(){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.retrieve()];case 1:return t.sent(),[2,!0];case 2:if((e=t.sent())instanceof a.ObjectNotFound)return[2,!1];throw e;case 3:return[2]}}))}))},e.prototype.documents=function(e){return e?(void 0===this.individualDocuments[e]&&(this.individualDocuments[e]=new d.Document(this.name,e,this.apiCall)),this.individualDocuments[e]):this._documents},e.prototype.overrides=function(e){return void 0===e?this._overrides:(void 0===this.individualOverrides[e]&&(this.individualOverrides[e]=new u.default(this.name,e,this.apiCall)),this.individualOverrides[e])},e.prototype.synonyms=function(e){return void 0===e?this._synonyms:(void 0===this.individualSynonyms[e]&&(this.individualSynonyms[e]=new l.default(this.name,e,this.apiCall)),this.individualSynonyms[e])},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}();t.default=f},7361:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o="/collections",i=function(){function e(e){this.apiCall=e}return e.prototype.create=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.post(o,e,t)]}))}))},e.prototype.retrieve=function(e){return void 0===e&&(e={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.get(o,e)]}))}))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return o},enumerable:!1,configurable:!0}),e}();t.default=i},5706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importStar(n(3065)),i=n(4410),a=function(){function e(e){var t=this;this.nodes=e.nodes||[],this.nodes=this.nodes.map((function(e){return t.setDefaultPathInNode(e)})).map((function(e){return t.setDefaultPortInNode(e)})).map((function(e){return r.__assign({},e)})),null==e.randomizeNodes&&(e.randomizeNodes=!0),!0===e.randomizeNodes&&this.shuffleArray(this.nodes),this.nearestNode=e.nearestNode,this.nearestNode=this.setDefaultPathInNode(this.nearestNode),this.nearestNode=this.setDefaultPortInNode(this.nearestNode),this.connectionTimeoutSeconds=e.connectionTimeoutSeconds||e.timeoutSeconds||5,this.healthcheckIntervalSeconds=e.healthcheckIntervalSeconds||60,this.numRetries=(void 0!==e.numRetries&&e.numRetries>=0?e.numRetries:this.nodes.length+(null==this.nearestNode?0:1))||3,this.retryIntervalSeconds=e.retryIntervalSeconds||.1,this.apiKey=e.apiKey,this.sendApiKeyAsQueryParam=e.sendApiKeyAsQueryParam,this.cacheSearchResultsForSeconds=e.cacheSearchResultsForSeconds||0,this.useServerSideSearchCache=e.useServerSideSearchCache||!1,this.axiosAdapter=e.axiosAdapter,this.logger=e.logger||o,this.logLevel=e.logLevel||"warn",this.logger.setLevel(this.logLevel),this.additionalHeaders=e.additionalHeaders,this.httpAgent=e.httpAgent,this.httpsAgent=e.httpsAgent,this.paramsSerializer=e.paramsSerializer,this.showDeprecationWarnings(e),this.validate()}return e.prototype.validate=function(){if(null==this.nodes||0===this.nodes.length||this.validateNodes())throw new i.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(null!=this.nearestNode&&this.isNodeMissingAnyParameters(this.nearestNode))throw new i.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(null==this.apiKey)throw new i.MissingConfigurationError("Ensure that apiKey is set");return!0},e.prototype.validateNodes=function(){var e=this;return this.nodes.some((function(t){return e.isNodeMissingAnyParameters(t)}))},e.prototype.isNodeMissingAnyParameters=function(e){return!["protocol","host","port","path"].every((function(t){return e.hasOwnProperty(t)}))&&null==e.url},e.prototype.setDefaultPathInNode=function(e){return null==e||e.hasOwnProperty("path")||(e.path=""),e},e.prototype.setDefaultPortInNode=function(e){if(null!=e&&!e.hasOwnProperty("port")&&e.hasOwnProperty("protocol"))switch(e.protocol){case"https":e.port=443;break;case"http":e.port=80}return e},e.prototype.showDeprecationWarnings=function(e){e.timeoutSeconds&&this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"),e.masterNode&&this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"),e.readReplicaNodes&&this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12")},e.prototype.shuffleArray=function(e){for(var t,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1));t=[e[r],e[n]],e[n]=t[0],e[r]=t[1]}},e}();t.default=a},8313:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(8700)),i=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.update=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.put(this.endpointPath(),e)]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}();t.default=i},5168:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(2783)),i=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.update=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.put(this.endpointPath(),e)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}();t.default=i},2783:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.post(this.endpointPath(),e)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/conversations/models"},enumerable:!1,configurable:!0}),e}();t.default=o},8700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(2783)),i=r.__importDefault(n(5168)),a="/conversations",s=function(){function e(e){this.apiCall=e,this.individualConversationModels={},this.apiCall=e,this._conversationsModels=new o.default(this.apiCall)}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(a)]}))}))},e.prototype.models=function(e){return void 0===e?this._conversationsModels:(void 0===this.individualConversationModels[e]&&(this.individualConversationModels[e]=new i.default(e,this.apiCall)),this.individualConversationModels[e])},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),e}();t.default=s},3343:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get("/debug")]}))}))},e}();t.default=o},9459:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Document=void 0;var r=n(3301),o=r.__importDefault(n(7361)),i=r.__importDefault(n(9078)),a=function(){function e(e,t,n){this.collectionName=e,this.documentId=t,this.apiCall=n}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]}))}))},e.prototype.update=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.patch(this.endpointPath(),e,t)]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.documentId))},e}();t.Document=a},9078:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayableParams=void 0;var r=n(3301),o=n(4410),i=n(6124);t.arrayableParams={query_by:"query_by",query_by_weights:"query_by_weights",facet_by:"facet_by",group_by:"group_by",include_fields:"include_fields",exclude_fields:"exclude_fields",highlight_fields:"highlight_fields",highlight_full_fields:"highlight_full_fields",pinned_hits:"pinned_hits",hidden_hits:"hidden_hits",infix:"infix",override_tags:"override_tags",num_typos:"num_typos",prefix:"prefix",sort_by:"sort_by"};var a="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,s=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return r.__extends(t,e),t.prototype.create=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){if(!e)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,t)]}))}))},t.prototype.upsert=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){if(!e)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"upsert"}))]}))}))},t.prototype.update=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){if(!e)throw new Error("No document provided");return null!=t.filter_by?[2,this.apiCall.patch(this.endpointPath(),e,Object.assign({},t))]:[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"update"}))]}))}))},t.prototype.delete=function(e){return void 0===e&&(e={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]}))}))},t.prototype.createMany=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return 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"),[2,this.import(e,t)]}))}))},t.prototype.import=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){var n,i,s,u;return r.__generator(this,(function(r){switch(r.label){case 0:if(Array.isArray(e))try{n=e.map((function(e){return JSON.stringify(e)})).join("\n")}catch(e){if(e instanceof RangeError&&e.message.includes("Too many properties to enumerate"))throw new Error("".concat(e,"\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 "));throw new Error(e)}else n=e;return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:t,bodyParameters:n,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!a})];case 1:if(i=r.sent(),Array.isArray(e)){if(s=i.split("\n").map((function(e){return JSON.parse(e)})),(u=s.filter((function(e){return!1===e.success}))).length>0)throw new o.ImportError("".concat(s.length-u.length," documents imported successfully, ").concat(u.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),s);return[2,s]}return[2,i]}}))}))},t.prototype.importStream=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){var n,i,s;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:t,bodyParameters:e,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!a})];case 1:if(n=r.sent(),i=n.split("\n").map((function(e){return JSON.parse(e)})),(s=i.filter((function(e){return!1===e.success}))).length>0)throw new o.ImportError("".concat(i.length-s.length," documents imported successfully, ").concat(s.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),i);return[2,i]}}))}))},t.prototype.export=function(e){return void 0===e&&(e={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]}))}))},t.prototype.exportStream=function(e){return void 0===e&&(e={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]}))}))},t}(i.SearchOnlyDocuments);t.default=s},2144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},8331:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(t,n){var r=e.call(this,t)||this;return r.importResults=n,r}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},2426:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},6731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},8280:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},2703:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},8274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},6909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},1081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(r.__importDefault(n(7796)).default);t.default=o},7796:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(e){function t(t){var n=this.constructor,r=e.call(this,t)||this;return r.name=n.name,Object.setPrototypeOf(r,n.prototype),r}return r.__extends(t,e),t}(Error);t.default=o},4410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportError=t.TypesenseError=t.ServerError=t.RequestUnauthorized=t.RequestMalformed=t.ObjectUnprocessable=t.ObjectNotFound=t.ObjectAlreadyExists=t.MissingConfigurationError=t.HTTPError=void 0;var r=n(3301),o=r.__importDefault(n(2144));t.HTTPError=o.default;var i=r.__importDefault(n(2426));t.MissingConfigurationError=i.default;var a=r.__importDefault(n(6731));t.ObjectAlreadyExists=a.default;var s=r.__importDefault(n(8280));t.ObjectNotFound=s.default;var u=r.__importDefault(n(2703));t.ObjectUnprocessable=u.default;var c=r.__importDefault(n(8274));t.RequestMalformed=c.default;var l=r.__importDefault(n(6909));t.RequestUnauthorized=l.default;var d=r.__importDefault(n(1081));t.ServerError=d.default;var f=r.__importDefault(n(8331));t.ImportError=f.default;var h=r.__importDefault(n(7796));t.TypesenseError=h.default},8231:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get("/health")]}))}))},e}();t.default=o},2275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(326)),i=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}();t.default=i},326:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=n(3529),i=n(7353),a="/keys",s=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.post(e.RESOURCEPATH,t)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(a)]}))}))},e.prototype.generateScopedSearchKey=function(e,t){var n=(0,i.normalizeArrayableParams)(t),r=JSON.stringify(n),a=Buffer.from((0,o.createHmac)("sha256",e).update(r).digest("base64")),s=e.substr(0,4),u="".concat(a).concat(s).concat(r);return Buffer.from(u).toString("base64")},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),e}();t.default=s},657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get("/metrics.json")]}))}))},e}();t.default=o},8621:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(875)),i=n(7353),a=function(){function e(e,t,n){void 0===n&&(n=!1),this.apiCall=e,this.configuration=t,this.useTextContentType=n,this.requestWithCache=new o.default}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.perform=function(e,t,n){void 0===t&&(t={});var o=(void 0===n?{}:n).cacheSearchResultsForSeconds,a=void 0===o?this.configuration.cacheSearchResultsForSeconds:o;return r.__awaiter(this,void 0,void 0,(function(){var n,o,s,u,c;return r.__generator(this,(function(l){return n={},this.useTextContentType&&(n["content-type"]="text/plain"),o={},!0===this.configuration.useServerSideSearchCache&&(o.use_cache=!0),s=r.__assign(r.__assign({},t),o),u={searches:e.searches.map(i.normalizeArrayableParams)},c=(0,i.normalizeArrayableParams)(s),[2,this.requestWithCache.perform(this.apiCall,this.apiCall.post,["/multi_search",u,c,n],{cacheResponseForSeconds:a})]}))}))},e}();t.default=a},3684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e}return e.prototype.perform=function(e,t){return void 0===t&&(t={}),r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.post("".concat("/operations","/").concat(e),{},t)]}))}))},e}();t.default=o},6582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(7361)),i=r.__importDefault(n(3629)),a=function(){function e(e,t,n){this.collectionName=e,this.overrideId=t,this.apiCall=n}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.overrideId))},e}();t.default=a},3629:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(7361)),i=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(o.default.RESOURCEPATH,"/").concat(this.collectionName).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/overrides"},enumerable:!1,configurable:!0}),e}();t.default=i},3777:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(5156)),i=function(){function e(e,t){this.presetId=e,this.apiCall=t}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.presetId))},e}();t.default=i},5156:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=n(7353),i=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,i;return r.__generator(this,(function(r){return"object"==typeof t.value&&"searches"in t.value?(n=t.value.searches.map((function(e){return(0,o.normalizeArrayableParams)(e)})),[2,this.apiCall.put(this.endpointPath(e),{value:{searches:n}})]):(i=(0,o.normalizeArrayableParams)(t.value),[2,this.apiCall.put(this.endpointPath(e),{value:i})])}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/presets"},enumerable:!1,configurable:!0}),e}();t.default=i},875:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(){this.responseCache=new Map,this.responsePromiseCache=new Map}return e.prototype.clearCache=function(){this.responseCache=new Map,this.responsePromiseCache=new Map},e.prototype.perform=function(e,t,n,o){return r.__awaiter(this,void 0,void 0,(function(){var i,a,s,u,c,l,d,f,h,p,y;return r.__generator(this,(function(v){switch(v.label){case 0:if(i=o.cacheResponseForSeconds,a=void 0===i?120:i,s=o.maxSize,u=void 0===s?100:s,a<=0||u<=0)return[2,t.call.apply(t,r.__spreadArray([e],n,!1))];if(c=JSON.stringify(n),l=this.responseCache.get(c),d=Date.now(),l){if(d-l.requestTimestamp<1e3*a)return this.responseCache.delete(c),this.responseCache.set(c,l),[2,Promise.resolve(l.response)];this.responseCache.delete(c)}if(f=this.responsePromiseCache.get(c)){if(d-f.requestTimestamp<1e3*a)return this.responsePromiseCache.delete(c),this.responsePromiseCache.set(c,f),[2,f.responsePromise];this.responsePromiseCache.delete(c)}return h=t.call.apply(t,r.__spreadArray([e],n,!1)),this.responsePromiseCache.set(c,{requestTimestamp:d,responsePromise:h}),[4,h];case 1:return p=v.sent(),this.responseCache.set(c,{requestTimestamp:d,response:p}),this.responseCache.size>u&&(y=this.responseCache.keys().next().value)&&this.responseCache.delete(y),this.responsePromiseCache.size>u&&(y=this.responsePromiseCache.keys().next().value)&&this.responsePromiseCache.delete(y),[2,p]}}))}))},e}();t.default=o},8557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(5706)),i=r.__importDefault(n(5996)),a=r.__importDefault(n(8621)),s=n(7112),u=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null===(t=e.sendApiKeyAsQueryParam)||void 0===t||t,!0===e.sendApiKeyAsQueryParam&&(e.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."),e.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(e),this.apiCall=new i.default(this.configuration),this.multiSearch=new a.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(e){e[0],e[1].documents().clearCache()}))},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];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.")},e}();t.default=u},7112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyCollection=void 0;var r=n(6124),o=function(){function e(e,t,n){this.name=e,this.apiCall=t,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}();t.SearchOnlyCollection=o},6124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyDocuments=void 0;var r=n(3301),o=r.__importDefault(n(875)),i=r.__importDefault(n(7361)),a=n(7353),s="/documents",u=function(){function e(e,t,n){this.collectionName=e,this.apiCall=t,this.configuration=n,this.requestWithCache=new o.default}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.search=function(e,t){var n=void 0===t?{}:t,o=n.cacheSearchResultsForSeconds,i=void 0===o?this.configuration.cacheSearchResultsForSeconds:o,s=n.abortSignal,u=void 0===s?null:s;return r.__awaiter(this,void 0,void 0,(function(){var t,n,o;return r.__generator(this,(function(r){return t={},!0===this.configuration.useServerSideSearchCache&&(t.use_cache=!0),n=(0,a.normalizeArrayableParams)(e),o=Object.assign({},t,n),[2,this.requestWithCache.perform(this.apiCall,this.apiCall.get,[this.endpointPath("search"),o,{abortSignal:u}],{cacheResponseForSeconds:i})]}))}))},e.prototype.endpointPath=function(e){return"".concat(i.default.RESOURCEPATH,"/").concat(this.collectionName).concat(s).concat(void 0===e?"":"/"+e)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return s},enumerable:!1,configurable:!0}),e}();t.SearchOnlyDocuments=u},4955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get("/stats.json")]}))}))},e}();t.default=o},4646:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(3533)),i=function(){function e(e,t){this.stopwordId=e,this.apiCall=t}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.stopwordId))},e}();t.default=i},3533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/stopwords"},enumerable:!1,configurable:!0}),e}();t.default=o},6821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(7361)),i=r.__importDefault(n(1104)),a=function(){function e(e,t,n){this.collectionName=e,this.synonymId=t,this.apiCall=n}return e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymId))},e}();t.default=a},1104:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3301),o=r.__importDefault(n(7361)),i=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(o.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/synonyms"},enumerable:!1,configurable:!0}),e}();t.default=i},7353:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeArrayableParams=void 0;var r=n(3301),o=n(9078);function i(e){return Object.keys(o.arrayableParams).filter((function(t){return void 0!==e[t]})).every((function(t){return n=e[t],!Array.isArray(n);var n}))}t.normalizeArrayableParams=function(e){var t=r.__assign({},e);if(!Object.keys(o.arrayableParams).filter((function(e){return Array.isArray(t[e])})).map((function(e){return t[e]=t[e].join(","),e})).length&&i(t))return t;if(!i(t))throw new Error("Failed to normalize arrayable params: ".concat(JSON.stringify(t)));return t}},3529:()=>{},5978:()=>{},7205:()=>{},4633:(e,t,n)=>{var r=n(3738).default;function o(){"use strict";e.exports=o=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new F(r||[]);return s(i,"_invoke",{value:T(e,n,a)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",m="executing",_="completed",g={};function b(){}function w(){}function O(){}var P={};f(P,c,(function(){return this}));var S=Object.getPrototypeOf,R=S&&S(S(k([])));R&&R!==i&&a.call(R,c)&&(P=R);var C=O.prototype=b.prototype=Object.create(P);function E(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(o,i,s,u){var c=p(e[o],e,i);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==r(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var o;s(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function T(e,n,r){var o=y;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===_){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=A(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=_,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var c=p(e,n,r);if("normal"===c.type){if(o=r.done?_:v,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=_,r.method="throw",r.arg=c.arg)}}}function A(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=p(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function k(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.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;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:k(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},3738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756:(e,t,n)=>{var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6425:(e,t,n)=>{"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(s=Object.create(null),e=>{const t=o.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const u=e=>(e=e.toLowerCase(),t=>a(t)===e),c=e=>t=>typeof t===e,{isArray:l}=Array,d=c("undefined"),f=u("ArrayBuffer"),h=c("string"),p=c("function"),y=c("number"),v=e=>null!==e&&"object"==typeof e,m=e=>{if("object"!==a(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},_=u("Date"),g=u("File"),b=u("Blob"),w=u("FileList"),O=u("URLSearchParams"),[P,S,R,C]=["ReadableStream","Request","Response","Headers"].map(u);function E(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,A=e=>!d(e)&&e!==T,x=(N="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>N&&e instanceof N);var N;const F=u("HTMLFormElement"),k=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),D=u("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};E(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",q="0123456789",L={DIGIT:q,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+q},H=u("AsyncFunction"),M=(B="function"==typeof setImmediate,z=p(T.postMessage),B?setImmediate:z?(V=`axios@${Math.random()}`,K=[],T.addEventListener("message",(({source:e,data:t})=>{e===T&&t===V&&K.length&&K.shift()()}),!1),e=>{K.push(e),T.postMessage(V,"*")}):e=>setTimeout(e));var B,z,V,K;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):"undefined"!=typeof process&&process.nextTick||M;var G={isArray:l,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=a(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:h,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:m,isReadableStream:P,isRequest:S,isResponse:R,isHeaders:C,isUndefined:d,isDate:_,isFile:g,isBlob:b,isRegExp:D,isFunction:p,isStream:e=>v(e)&&p(e.pipe),isURLSearchParams:O,isTypedArray:x,isFileList:w,forEach:E,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,o)=>{const i=t&&j(n,o)||o;m(n[i])&&m(r)?n[i]=e(n[i],r):m(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e(E(t,((t,o)=>{n&&p(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],r&&!r(s,e,t)||u[s]||(t[s]=e[s],u[s]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:u,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!y(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:F,hasOwnProperty:k,hasOwnProp:k,reduceDescriptors:I,freezeMethods:e=>{I(e,((t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];p(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:j,global:T,isContextDefined:A,ALPHABET:L,generateString:(e=16,t=L.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=l(e)?[]:{};return E(e,((e,t)=>{const i=n(e,r+1);!d(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:H,isThenable:e=>e&&(v(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:M,asap:W};function J(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}G.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:G.toJSONObject(this.config),code:this.code,status:this.status}}});const $=J.prototype,Q={};function X(e){return G.isPlainObject(e)||G.isArray(e)}function Y(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map((function(e,t){return e=Y(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["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((e=>{Q[e]={value:e}})),Object.defineProperties(J,Q),Object.defineProperty($,"isAxiosError",{value:!0}),J.from=(e,t,n,r,o,i)=>{const a=Object.create($);return G.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const ee=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)}));function te(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!s&&G.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(X)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(s=G.toArray(e)))return n=Y(n),s.forEach((function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===a?Z([n],r,i):null===a?n:n+"[]",u(e))})),!1;return!!X(e)||(t.append(Z(o,n,i),u(e)),!1)}const l=[],d=Object.assign(ee,{defaultVisitor:c,convertValue:u,isVisitable:X});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,(function(n,i){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;function ie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ae(e,t,n){if(!t)return e;const r=n&&n.encode||ie,o=n&&n.serialize;let i;if(i=o?o(t,n):G.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var se=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ce={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const le="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,fe=le&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pe=le&&window.location.href||"http://localhost";var ye={...Object.freeze({__proto__:null,hasBrowserEnv:le,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:fe,navigator:de,origin:pe}),...ce};function ve(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&G.isArray(r)?r.length:i,s?(G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&G.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const me={transitional:ue,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);if(o&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return r?JSON.stringify(ve(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new ye.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ye.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||me.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{me.headers[e]={}}));var _e=me;const ge=G.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"]),be=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:G.isArray(e)?e.map(Oe):String(e)}function Pe(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class Se{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=we(t);if(!o)throw new Error("header name must be a non-empty string");const i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Oe(e))}const i=(e,t)=>G.forEach(e,((e,n)=>o(e,n,t)));if(G.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ge[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(G.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=we(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Pe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=we(e)){const o=G.findKey(n,e);!o||t&&!Pe(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Pe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,((r,o)=>{const i=G.findKey(n,o);if(i)return t[i]=Oe(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Oe(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[be]=this[be]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=we(e);t[r]||(function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Se.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),G.freezeMethods(Se);var Re=Se;function Ce(e,t){const n=this||_e,r=t||n,o=Re.from(r.headers);let i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Ee(e){return!(!e||!e.__CANCEL__)}function je(e,t,n){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,n),this.name="CanceledError"}function Te(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(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)):e(n)}G.inherits(je,J,{__CANCEL__:!0});const Ae=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,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,e({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,[t?"download":"upload"]:!0})}),n)},xe=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ne=e=>(...t)=>G.asap((()=>e(...t)));var Fe=ye.hasStandardBrowserEnv?function(){const e=ye.navigator&&/(msie|trident)/i.test(ye.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=G.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},ke=ye.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),G.isString(r)&&a.push("path="+r),G.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function De(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ie=e=>e instanceof Re?{...e}:e;function Ue(e,t){t=t||{};const n={};function r(e,t,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function a(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?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:(e,t)=>o(Ie(e),Ie(t),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=u[r]||o,a=i(e[r],t[r],r);G.isUndefined(a)&&i!==s||(n[r]=a)})),n}var qe=e=>{const t=Ue({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:u}=t;if(t.headers=s=Re.from(s),t.url=ae(De(t.baseURL,t.url),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),G.isFormData(r))if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ye.hasStandardBrowserEnv&&(o&&G.isFunction(o)&&(o=o(t)),o||!1!==o&&Fe(t.url))){const e=i&&a&&ke.read(a);e&&s.set(i,e)}return t},Le="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=qe(e);let o=r.data;const i=Re.from(r.headers).normalize();let a,s,u,c,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){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=Re.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Te((function(e){t(e),p()}),(function(e){n(e),p()}),{data:d&&"text"!==d&&"json"!==d?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:e,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,e,y)),y=null)},y.onerror=function(){n(new J("Network Error",J.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ue;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new J(t,o.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&G.forEach(i.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),G.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),d&&"json"!==d&&(y.responseType=r.responseType),h&&([u,l]=Ae(h,!0),y.addEventListener("progress",u)),f&&y.upload&&([s,c]=Ae(f),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{y&&(n(!t||t.type?new je(null,e,y):t),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===ye.protocols.indexOf(m)?n(new J("Unsupported protocol "+m+":",J.ERR_BAD_REQUEST,e)):y.send(o||null)}))},He=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof J?t:new je(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>G.asap(a),s}};const Me=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Me(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},ze="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ve=ze&&"function"==typeof ReadableStream,Ke=ze&&("function"==typeof TextEncoder?(We=new TextEncoder,e=>We.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var We;const Ge=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=Ve&&Ge((()=>{let e=!1;const t=new Request(ye.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),$e=Ve&&Ge((()=>G.isReadableStream(new Response("").body))),Qe={stream:$e&&(e=>e.body)};var Xe;ze&&(Xe=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=G.isFunction(Xe[e])?t=>t[e]():(t,n)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,n)})})));const Ye={http:null,xhr:Le,fetch:ze&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:l,withCredentials:d="same-origin",fetchOptions:f}=qe(e);c=c?(c+"").toLowerCase():"text";let h,p=He([o,i&&i.toAbortSignal()],a);const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(u&&Je&&"get"!==n&&"head"!==n&&0!==(v=await(async(e,t)=>{const n=G.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new Request(ye.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await Ke(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(G.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=xe(v,Ae(Ne(u)));r=Be(n.body,65536,e,t)}}G.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;h=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(h);const a=$e&&("stream"===c||"response"===c);if($e&&(s||a&&y)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=G.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&xe(t,Ae(Ne(s),!0))||[];i=new Response(Be(i.body,65536,n,(()=>{r&&r(),y&&y()})),e)}c=c||"text";let m=await Qe[G.findKey(Qe,c)||"text"](i,e);return!a&&y&&y(),await new Promise(((t,n)=>{Te(t,n,{data:m,headers:Re.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:h})}))}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,h),{cause:t.cause||t});throw J.from(t,t&&t.code,e,h)}})};G.forEach(Ye,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ze=e=>`- ${e}`,et=e=>G.isFunction(e)||null===e||!1===e;var tt=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new J("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ze).join("\n"):" "+Ze(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new je(null,e)}function rt(e){return nt(e),e.headers=Re.from(e.headers),e.data=Ce.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt(e.adapter||_e.adapter)(e).then((function(t){return nt(e),t.data=Ce.call(e,e.transformResponse,t),t.headers=Re.from(t.headers),t}),(function(t){return Ee(t)||(nt(e),t&&t.response&&(t.response.data=Ce.call(e,e.transformResponse,t.response),t.response.headers=Re.from(t.response.headers))),Promise.reject(t)}))}const ot={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ot[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const it={};ot.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new J(r(o," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!it[o]&&(it[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var at={assertOptions:function(e,t,n){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);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:ot};const st=at.validators;class ut{constructor(e){this.defaults=e,this.interceptors={request:new se,response:new se}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ue(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&at.assertOptions(n,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:at.assertOptions(r,{encode:st.function,serialize:st.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Re.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,d=0;if(!s){const e=[rt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new je(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt((function(t){e=t})),cancel:e}}}var dt=lt;const ft={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(ft).forEach((([e,t])=>{ft[t]=e}));var ht=ft;const pt=function e(t){const n=new ct(t),o=r(ct.prototype.request,n);return G.extend(o,ct.prototype,n,{allOwnKeys:!0}),G.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Ue(t,n))},o}(_e);pt.Axios=ct,pt.CanceledError=je,pt.CancelToken=dt,pt.isCancel=Ee,pt.VERSION="1.7.7",pt.toFormData=te,pt.AxiosError=J,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Ue,pt.AxiosHeaders=Re,pt.formToJSON=e=>ve(G.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=tt,pt.HttpStatusCode=ht,pt.default=pt,e.exports=pt},3301:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>D,__assign:()=>i,__asyncDelegator:()=>R,__asyncGenerator:()=>S,__asyncValues:()=>C,__await:()=>P,__awaiter:()=>p,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>k,__classPrivateFieldSet:()=>F,__createBinding:()=>v,__decorate:()=>s,__disposeResources:()=>U,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>o,__generator:()=>y,__importDefault:()=>x,__importStar:()=>A,__makeTemplateObject:()=>E,__metadata:()=>h,__param:()=>u,__propKey:()=>d,__read:()=>g,__rest:()=>a,__rewriteRelativeImportExtension:()=>q,__runInitializers:()=>l,__setFunctionName:()=>f,__spread:()=>b,__spreadArray:()=>O,__spreadArrays:()=>w,__values:()=>_,default:()=>L});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var p={};for(var y in r)p[y]="access"===y?{}:r[y];for(var y in r.access)p.access[y]=r.access[y];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,n[h])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=a(v.get))&&(d.get=s),(s=a(v.set))&&(d.set=s),(s=a(v.init))&&o.unshift(s)}else(s=a(v))&&("field"===u?o.unshift(s):d[c]=s)}l&&Object.defineProperty(l,r.name,d),f=!0}function l(e,t,n){for(var r=arguments.length>2,o=0;o0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function b(){for(var e=[],t=0;t1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof P?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function R(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:P(e[r](t)),done:!1}:o?o(t):t}:o}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},T=function(e){return T=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},T(e)};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=T(e),r=0;r{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function e(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function s(t){e(a,o,i,s,u,"next",t)}function u(t){e(a,o,i,s,u,"throw",t)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function s(e,t){for(var n=0;nC});var c=n(4756),l=n.n(c),d=function(){return u((function e(){var t,n,r,i,a,s,u,c,l,d,f,h,p,y,v,m,_,g,b,w,O=this,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.server=P.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(t=this.server.cacheSearchResultsForSeconds)&&void 0!==t?t:120,this.additionalSearchParameters=null!==(n=P.additionalSearchParameters)&&void 0!==n?n:{},this.additionalSearchParameters.query_by=null!==(r=null!==(i=this.additionalSearchParameters.queryBy)&&void 0!==i?i:this.additionalSearchParameters.query_by)&&void 0!==r?r:"",this.additionalSearchParameters.preset=null!==(a=null!==(s=this.additionalSearchParameters.preset)&&void 0!==s?s:this.additionalSearchParameters.preset)&&void 0!==a?a:"",this.additionalSearchParameters.sort_by=null!==(u=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==u?u:"",this.additionalSearchParameters.highlight_full_fields=null!==(l=null!==(d=this.additionalSearchParameters.highlightFullFields)&&void 0!==d?d:this.additionalSearchParameters.highlight_full_fields)&&void 0!==l?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(f=P.geoLocationField)&&void 0!==f?f:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(h=P.facetableFieldsWithSpecialCharacters)&&void 0!==h?h:[],this.collectionSpecificSearchParameters=null!==(p=P.collectionSpecificSearchParameters)&&void 0!==p?p:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(e){var t,n,r,o,i,a,s=O.collectionSpecificSearchParameters[e];s.query_by=null!==(t=s.queryBy)&&void 0!==t?t: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(e){return void 0===s[e]?delete s[e]:{}}))})),this.renderingContent=P.renderingContent,this.flattenGroupedHits=null===(y=P.flattenGroupedHits)||void 0===y||y,this.facetByOptions=null!==(v=P.facetByOptions)&&void 0!==v?v:{},this.filterByOptions=null!==(m=P.filterByOptions)&&void 0!==m?m:{},this.sortByOptions=null!==(_=P.sortByOptions)&&void 0!==_?_:{},this.collectionSpecificFacetByOptions=null!==(g=P.collectionSpecificFacetByOptions)&&void 0!==g?g:{},this.collectionSpecificFilterByOptions=null!==(b=P.collectionSpecificFilterByOptions)&&void 0!==b?b:{},this.collectionSpecificSortByOptions=null!==(w=P.collectionSpecificSortByOptions)&&void 0!==w?w:{}}),[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(e){return e.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(e){return 0===(e.query_by||"").length&&0===(e.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.")}}])}(),f=n(8567);function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);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(e,t){return t.startsWith("-")&&!n._isNumber(t)?e[0].push(t.substring(1)):e[1].push(t),e}),[[],[]]),a=v(i,2),s=a[0],u=a[1],c=[];if(u.length>0){var l=n._shouldUseExactMatchForField(o,t)?":=":":";c.push("".concat(o).concat(l,"[").concat(u.map((function(e){return n._escapeFacetValue(e)})).join(","),"]"))}if(s.length>0){var d=n._shouldUseExactMatchForField(o,t)?":!=":":!";c.push("".concat(o).concat(d,"[").concat(s.map((function(e){return n._escapeFacetValue(e)})).join(","),"]"))}return c.filter((function(e){return e})).join(" && ")}var f,h=n._parseFacetFilter(e),p=h.fieldName,y=h.fieldValue;if(y.startsWith("-")&&!n._isNumber(y)){var m=n._shouldUseExactMatchForField(p,t)?":!=":":!";f="".concat(p).concat(m,"[").concat(n._escapeFacetValue(y.substring(1)),"]")}else{var _=n._shouldUseExactMatchForField(p,t)?":=":":";f="".concat(p).concat(_,"[").concat(n._escapeFacetValue(y),"]")}return f})).join(" && "):r}},{key:"_parseFacetFilter",value:function(e){var t,n,r,o,i;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var a=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(a.join("|"),"):(.*)$")),null!=(r=e.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=e.match(n))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(e,"` 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(e){return"boolean"==typeof e||"true"===e||"false"===e||this._isNumber(e)?e:"`".concat(e,"`")}},{key:"_isNumber",value:function(e){return Number.isInteger(e%1)||!!(e%1)}},{key:"_adaptNumericFilters",value:function(e){var t=this,n="";if(!e)return n;var r={};e.forEach((function(e){var n=t._parseNumericFilter(e),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(e){null!=r[e]["<="]&&null!=r[e][">="]?o.push("".concat(e,":=[").concat(r[e][">="],"..").concat(r[e]["<="],"]")):null!=r[e]["<="]?o.push("".concat(e,":<=").concat(r[e]["<="])):null!=r[e][">="]?o.push("".concat(e,":>=").concat(r[e][">="])):null!=r[e]["="]?o.push("".concat(e,":=").concat(r[e]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(r[e])))})),o.join(" && ")}},{key:"_parseNumericFilter",value:function(e){var t,n,r,o,i,a;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(n=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(r=e.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=e.match(n)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(e,"` 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(e){var t=e.insideBoundingBox,n=e.aroundRadius,r=e.aroundLatLng,o=e.insidePolygon;if(t){var i,a,s,u;if(Array.isArray(t)){var c=v(t.flat(),4);i=c[0],a=c[1],s=c[2],u=c[3]}else{var l=v(t.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 d="".concat(parseFloat(n)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(r,", ").concat(d,")")}if(o){var f=o;return Array.isArray(o)&&(f=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(f,")")}}},{key:"_adaptFilters",value:function(e,t){var n=[];return e.filters&&n.push(e.filters),n.push(this._adaptFacetFilters(e.facetFilters,t)),n.push(this._adaptNumericFilters(e.numericFilters)),n.push(this._adaptGeoFilter(e)),n.filter((function(e){return e&&""!==e})).join(" && ")}},{key:"_adaptIndexName",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(e,t){var n=this;return[e].flat().map((function(e){var r;return null!==(r=n.configuration.collectionSpecificFacetByOptions)&&void 0!==r&&null!==(r=r[t])&&void 0!==r&&r[e]?"".concat(e).concat(n.configuration.collectionSpecificFacetByOptions[t][e]):n.configuration.facetByOptions[e]?"".concat(e).concat(n.configuration.facetByOptions[e]):e})).join(",")}},{key:"_adaptRulesContextsToOverrideTags",value:function(e){return e.join(",")}},{key:"_buildSearchParameters",value:function(e){for(var t,n,r=e.params,o=e.indexName,i=this._adaptIndexName(o),a={},s=0,u=Object.entries(this.additionalSearchParameters);s0&&(_.override_tags=this._adaptRulesContextsToOverrideTags(r.ruleContexts)),r.typesenseVectorQuery&&(_.vector_query=r.typesenseVectorQuery);var b=(null===(t=this.configuration.collectionSpecificSortByOptions)||void 0===t||null===(t=t[i])||void 0===t?void 0:t[_.sort_by])||(null===(n=this.configuration.sortByOptions)||void 0===n?void 0:n[_.sort_by]);return null!=(null==b?void 0:b.enable_overrides)&&(_.enable_overrides=b.enable_overrides),Object.fromEntries(Object.entries(_).filter((function(e){var t=v(e,2),n=(t[0],t[1]);return null!=n&&""!==n})))}},{key:"_camelToSnakeCase",value:function(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}},{key:"request",value:(e=t(l().mark((function e(){var t,n,r,o,i,a,s,u,c,d=this;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.instantsearchRequests.map((function(e){return d._buildSearchParameters(e)})),o={},!0!==(null===(t=r[0])||void 0===t?void 0:t.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(e){return e.q,e.conversation,e.conversation_id,e.conversation_model_id,h(e,m)}))),e.abrupt("return",this.typesenseClient.multiSearch.perform({searches:r},o));case 4:case"end":return e.stop()}}),e,this)}))),function(){return e.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 e}();function g(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||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 b(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={_adaptHighlightTag:function(e,t,n){return e.replace(new RegExp("","g"),t||"").replace(new RegExp("","g"),n||"")},_adaptNumberOfPages:function(){var e=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(e)?Math.ceil(e):1}};function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};o(this,e),this.typesenseResponse=t,this.instantsearchRequest=n,this.configuration=r,this.allTypesenseResults=i,this.fullTypesenseResponse=a}),[{key:"_adaptGroupedHits",value:function(e){var t=this,n=[];return n=e.map((function(e){var n=t._adaptHits(e.hits);return n.forEach((function(t){t.group_key=t._group_key=e.group_key,e.found&&(t._group_found=e.found)})),n})),this.configuration.flattenGroupedHits?n.flat():n.map((function(e){return P(P({},e[0]),{},{_grouped_hits:e})}))}},{key:"_adaptHits",value:function(e){var t=this;return e.map((function(e){var n=P({},e.document);n.objectID=e.document.id,n._snippetResult=t._adaptHighlightResult(e,"snippet"),n._highlightResult=t._adaptHighlightResult(e,"value"),n._rawTypesenseHit=e,t.fullTypesenseResponse.conversation&&(n._rawTypesenseConversation=t.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(t){Object.keys(e).includes(t)&&!Object.keys(n).includes(t)&&(n[t]=e[t])}));var r=n[t.configuration.geoLocationField];return r&&(n._geoloc={lat:r[0],lng:r[1]}),n}))}},{key:"_adaptHighlightResult",value:function(e,t){var n={};return null!=e.highlight&&this.isHighlightPost0240RCN32Format(e.highlight)?this.adaptHighlightObject(e,n,t):this.adaptHighlightsArray(e,n,t),n}},{key:"isHighlightPost0240RCN32Format",value:function(e){return null==e.full&&null==e.snippet}},{key:"adaptHighlightsArray",value:function(e,t,n){var r=this;Object.assign.apply(Object,[t].concat(g(Object.entries(e.document).map((function(e){var t=v(e,2);return b({},t[0],{value:t[1],matchLevel:"none",matchedWords:[]})}))))),e.highlights.forEach((function(e){t[e.field]={value:e[n]||e["".concat(n,"s")],matchLevel:"full",matchedWords:e.matched_tokens},e.indices&&(t[e.field].matchedIndices=e.indices)})),Object.entries(t).forEach((function(o){var a=v(o,2),s=a[0],u=a[1],c=s,l=u.value,d=u.matchLevel,f=u.matchedWords,h=u.matchedIndices;null==l?t[c]=r._adaptHighlightNullValue():Array.isArray(l)?(t[c]=[],e.document[c].forEach((function(e,o){h&&h.includes(o)?t[c].push({value:r._adaptHighlightTag("".concat(l[h.indexOf(o)]),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag),matchLevel:d,matchedWords:f[o]}):"object"===i(e)?t[c].push(r._adaptHighlightInObjectValue(e,{},n)):t[c].push({value:"".concat(e),matchLevel:"none",matchedWords:[]})}))):"object"===i(l)?t[c]=r._adaptHighlightInObjectValue(l,{},n):t[c].value=r._adaptHighlightTag("".concat(l),r.instantsearchRequest.params.highlightPreTag,r.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(e,t,n){Object.assign(t,this._adaptHighlightInObjectValue(e.document,e.highlight,n))}},{key:"_adaptHighlightInObjectValue",value:function(e,t,n){var r=this;return Object.assign.apply(Object,[{}].concat(g(Object.entries(e).map((function(e){var o,a=v(e,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==t?void 0:t[s])&&void 0!==c?c:[],n)}else if("object"===i(u)){var l;o=r._adaptHighlightInObjectValue(u,null!==(l=null==t?void 0:t[s])&&void 0!==l?l:{},n)}else o=r._adaptHighlightInPrimitiveValue(u,null==t?void 0:t[s],n);return b({},s,o)})))))}},{key:"_adaptHighlightInArrayValue",value:function(e,t,n){var r=this;return e.map((function(e,o){var a;if(null==e)a=r._adaptHighlightNullValue();else if(Array.isArray(e)){var s;a=r._adaptHighlightInArrayValue(e,null!==(s=null==t?void 0:t[o])&&void 0!==s?s:[],n)}else if("object"===i(e)){var u;a=r._adaptHighlightInObjectValue(e,null!==(u=null==t?void 0:t[o])&&void 0!==u?u:{},n)}else a=r._adaptHighlightInPrimitiveValue(e,null==t?void 0:t[o],n);return a}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(e,t,n){var r,o;return null!=t?{value:this._adaptHighlightTag("".concat(null!==(r=null!==(o=t[n])&&void 0!==o?o:t.highlight)&&void 0!==r?r:t.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(t.matched_tokens||[]).length>0?"full":"none",matchedWords:t.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(e),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(e){var t={};return e.forEach((function(e){Object.assign(t,b({},e.field_name,Object.assign.apply(Object,[{}].concat(g(e.counts.map((function(e){return b({},e.value,e.count)})))))))})),t}},{key:"_adaptFacetStats",value:function(e){var t={};return e.forEach((function(e){Object.keys(e.stats).length>0&&Object.assign(t,b({},e.field_name,e.stats))})),t}},{key:"_adaptRenderingContent",value:function(e){var t,n=Object.assign({},this.configuration.renderingContent);return null==(null===(t=n.facetOrdering)||void 0===t||null===(t=t.facets)||void 0===t?void 0:t.order)&&(n.facetOrdering=n.facetOrdering||{},n.facetOrdering.facets=n.facetOrdering.facets||{},n.facetOrdering.facets.order=g(new Set(e.map((function(e){return e.field_name})).concat(this.allTypesenseResults.map((function(e){return e.facet_counts||[]})).flat().map((function(e){return e.field_name})).filter((function(e){return e})))))),n}},{key:"_adaptUserData",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"adapt",value:function(){var e=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),t=P({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(e).length>0?{renderingContent:e}:null);return this.typesenseResponse.metadata&&(t.appliedRules=["typesense-override"],t.userData=this._adaptUserData(this.typesenseResponse.metadata)),this.fullTypesenseResponse.conversation&&0===t.hits.length&&(t.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),t}}])}();Object.assign(S.prototype,w);var R=function(){return u((function e(t,n){o(this,e),this.typesenseResponse=t,this.instantsearchRequest=n}),[{key:"_adaptFacetHits",value:function(e){var t=this;return e.find((function(e){return e.field_name===t.instantsearchRequest.params.facetName})).counts.map((function(e){return{value:e.value,highlighted:t._adaptHighlightTag(e.highlighted,t.instantsearchRequest.params.highlightPreTag,t.instantsearchRequest.params.highlightPostTag),count:e.count}}))}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])}();Object.assign(R.prototype,w);var C=function(){return u((function e(t){var n=this;o(this,e),this.updateConfiguration(t),this.searchClient={clearCache:function(){return n.clearCache()},search:function(e){return n.searchTypesenseAndAdapt(e)},searchForFacetValues:function(e){return n.searchTypesenseForFacetValuesAndAdapt(e)}}}),[{key:"searchTypesenseAndAdapt",value:(r=t(l().mark((function e(t){var n,r,o=this;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return n=e.sent,r=n.results.map((function(e,r){return o._validateTypesenseResult(e),new S(e,t[r],o.configuration,n.results,n).adapt()})),e.abrupt("return",{results:r});case 8:throw e.prev=8,e.t0=e.catch(0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e){return r.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(n=t(l().mark((function e(t){var n,r,o=this;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return n=e.sent,r=n.results.map((function(e,n){return o._validateTypesenseResult(e),new R(e,t[n],o.configuration).adapt()})),e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e){return n.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(e=t(l().mark((function e(t){var n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new _(t,this.typesenseClient,this.configuration),e.next=3,n.request();case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)}))),function(t){return e.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new f._t(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(e){return this.configuration=new d(e),this.configuration.validate(),this.typesenseClient=new f._t(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(e){if(e.error)throw new Error("".concat(e.code," - ").concat(e.error));if(!e.hits&&!e.grouped_hits)throw new Error("Did not find any hits. ".concat(e.code," - ").concat(e.error))}}]);var e,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 208b674..d200347 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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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 != null) {\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 +{"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,CAw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Q,OAAAi+C,EAAA7S,EAAArxB,IAAAA,MAED,SAAAmkC,EAAuC9O,GAAqB,IAAA+O,EAAArH,EAAA,OAAA/8B,IAAAA,MAAA,SAAAqkC,GAAA,cAAAA,EAAAngC,KAAAmgC,EAAAnlC,MAAA,OACsD,OAA1GklC,EAAiB,IAAIhP,EAAqBC,EAAuB5yC,KAAK6yC,gBAAiB7yC,KAAKwG,eAAco7C,EAAAnlC,KAAA,EAChFklC,EAAej3B,UAAS,OAAjC,OAAjB4vB,EAAiBsH,EAAAt1C,KAAAs1C,EAAAxhC,OAAA,SAChBk6B,GAAiB,wBAAAsH,EAAAjgC,OAAA,GAAA+/B,EAAA,UACzB,SAAAG,GAAA,OAAAJ,EAAApiD,MAAA,KAAAC,UAAA,KAAA0U,IAAA,aAAAxQ,MAED,WAEE,OADAxD,KAAK6yC,gBAAkB,IAAIiP,EAAAA,GAAsB9hD,KAAKwG,cAAciqC,QAC7DzwC,KAAKwgD,YACd,GAAC,CAAAxsC,IAAA,sBAAAxQ,MAED,SAAoBsM,GAIlB,OAHA9P,KAAKwG,cAAgB,IAAIwM,EAAclD,GACvC9P,KAAKwG,cAAc+C,WACnBvJ,KAAK6yC,gBAAkB,IAAIiP,EAAAA,GAAsB9hD,KAAKwG,cAAciqC,SAC7D,CACT,GAAC,CAAAz8B,IAAA,2BAAAxQ,MAED,SAAyBw9C,GACvB,GAAIA,EAAgBhzC,MAClB,MAAM,IAAI1D,MAAM,GAADnG,OAAI68C,EAAgBr0C,KAAI,OAAAxI,OAAM68C,EAAgBhzC,QAE/D,IAAKgzC,EAAgB9F,OAAS8F,EAAgB7B,aAC5C,MAAM,IAAI70C,MAAM,0BAADnG,OAA2B68C,EAAgBr0C,KAAI,OAAAxI,OAAM68C,EAAgBhzC,OAExF,KA3BC,IAAAyzC,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/AnalyticsEvents.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/Stats.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/typesense/lib/Typesense/Utils.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/./node_modules/typesense/node_modules/tslib/tslib.es6.mjs","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/./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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Errors = exports.SearchClient = exports.Client = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Client_1 = tslib_1.__importDefault(require(\"./Typesense/Client\"));\nexports.Client = Client_1.default;\nvar SearchClient_1 = tslib_1.__importDefault(require(\"./Typesense/SearchClient\"));\nexports.SearchClient = SearchClient_1.default;\nvar Errors = tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Aliases_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Alias.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.name));\n };\n return Alias;\n}());\nexports.default = Alias;\n//# sourceMappingURL=Alias.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar AnalyticsRules_1 = tslib_1.__importDefault(require(\"./AnalyticsRules\"));\nvar AnalyticsRule_1 = tslib_1.__importDefault(require(\"./AnalyticsRule\"));\nvar AnalyticsEvents_1 = tslib_1.__importDefault(require(\"./AnalyticsEvents\"));\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 this._analyticsEvents = new AnalyticsEvents_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 Analytics.prototype.events = function () {\n return this._analyticsEvents;\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/analytics/events\";\nvar AnalyticsEvents = /** @class */ (function () {\n function AnalyticsEvents(apiCall) {\n this.apiCall = apiCall;\n this.apiCall = apiCall;\n }\n AnalyticsEvents.prototype.create = function (params) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n AnalyticsEvents.prototype.endpointPath = function (operation) {\n return \"\".concat(AnalyticsEvents.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + encodeURIComponent(operation));\n };\n Object.defineProperty(AnalyticsEvents, \"RESOURCEPATH\", {\n get: function () {\n return RESOURCEPATH;\n },\n enumerable: false,\n configurable: true\n });\n return AnalyticsEvents;\n}());\nexports.default = AnalyticsEvents;\n//# sourceMappingURL=AnalyticsEvents.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar AnalyticsRules_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n AnalyticsRule.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.name));\n };\n return AnalyticsRule;\n}());\nexports.default = AnalyticsRule;\n//# sourceMappingURL=AnalyticsRule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar axios_1 = tslib_1.__importDefault(require(\"axios\"));\nvar http_1 = require(\"http\");\nvar https_1 = require(\"https\");\nvar Errors_1 = require(\"./Errors\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./Errors/TypesenseError\"));\nvar APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nvar HEALTHY = true;\nvar UNHEALTHY = false;\nvar isNodeJSEnvironment = typeof process !== \"undefined\" &&\n process.versions != null &&\n process.versions.node != null;\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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, _e;\n var _f = _a.queryParameters, queryParameters = _f === void 0 ? null : _f, _g = _a.bodyParameters, bodyParameters = _g === void 0 ? null : _g, _h = _a.additionalHeaders, additionalHeaders = _h === void 0 ? {} : _h, _j = _a.abortSignal, abortSignal = _j === void 0 ? null : _j, _k = _a.responseType, responseType = _k === void 0 ? undefined : _k, _l = _a.skipConnectionTimeout, skipConnectionTimeout = _l === void 0 ? false : _l, _m = _a.enableKeepAlive, enableKeepAlive = _m === void 0 ? undefined : _m;\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var requestNumber, lastException, wasAborted, _loop_1, this_1, numTries, state_1;\n return tslib_1.__generator(this, function (_o) {\n switch (_o.label) {\n case 0:\n this.configuration.validate();\n requestNumber = Date.now();\n wasAborted = false;\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 tslib_1.__generator(this, function (_p) {\n switch (_p.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 _p.label = 1;\n case 1:\n _p.trys.push([1, 3, 5, 6]);\n requestOptions = {\n adapter: this_1.configuration.axiosAdapter,\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 else if (enableKeepAlive === true) {\n if (!isNodeJSEnvironment) {\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Cannot use custom httpAgent in a browser environment to enable keepAlive\"));\n }\n else {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Enabling KeepAlive\"));\n requestOptions.httpAgent = new http_1.Agent({ keepAlive: true });\n }\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 else if (enableKeepAlive === true) {\n if (!isNodeJSEnvironment) {\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Cannot use custom httpAgent in a browser environment to enable keepAlive\"));\n }\n else {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Enabling keepAlive\"));\n requestOptions.httpsAgent = new https_1.Agent({ keepAlive: true });\n }\n }\n if (this_1.configuration.paramsSerializer) {\n this_1.logger.debug(\"Request #\".concat(requestNumber, \": Using custom paramsSerializer\"));\n requestOptions.paramsSerializer = this_1.configuration.paramsSerializer;\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 () {\n wasAborted = true;\n source_1.cancel();\n };\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 = _p.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 = _p.sent();\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n if (!wasAborted) {\n this_1.setNodeHealthcheck(node, UNHEALTHY);\n }\n lastException = error_1;\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Request to Node \").concat(node.index, \" failed due to \\\"\").concat((_d = error_1 === null || error_1 === void 0 ? void 0 : error_1.code) !== null && _d !== void 0 ? _d : \"\", \" \").concat(error_1.message).concat(error_1.response == null\n ? \"\"\n : \" - \" + JSON.stringify((_e = error_1.response) === null || _e === void 0 ? void 0 : _e.data), \"\\\"\"));\n // this.logger.debug(error.stack)\n if (wasAborted) {\n return [2 /*return*/, { value: Promise.reject(new Error(\"Request aborted by caller.\")) }];\n }\n if (numTries < this_1.numRetriesPerRequest + 1) {\n this_1.logger.warn(\"Request #\".concat(requestNumber, \": Sleeping for \").concat(this_1.retryIntervalSeconds, \"s and then retrying request...\"));\n }\n return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)];\n case 4:\n _p.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 _o.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 = _o.sent();\n if (typeof state_1 === \"object\")\n return [2 /*return*/, state_1.value];\n _o.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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Configuration_1 = tslib_1.__importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = tslib_1.__importDefault(require(\"./ApiCall\"));\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Collection_1 = tslib_1.__importDefault(require(\"./Collection\"));\nvar Aliases_1 = tslib_1.__importDefault(require(\"./Aliases\"));\nvar Alias_1 = tslib_1.__importDefault(require(\"./Alias\"));\nvar Keys_1 = tslib_1.__importDefault(require(\"./Keys\"));\nvar Key_1 = tslib_1.__importDefault(require(\"./Key\"));\nvar Debug_1 = tslib_1.__importDefault(require(\"./Debug\"));\nvar Metrics_1 = tslib_1.__importDefault(require(\"./Metrics\"));\nvar Stats_1 = tslib_1.__importDefault(require(\"./Stats\"));\nvar Health_1 = tslib_1.__importDefault(require(\"./Health\"));\nvar Operations_1 = tslib_1.__importDefault(require(\"./Operations\"));\nvar MultiSearch_1 = tslib_1.__importDefault(require(\"./MultiSearch\"));\nvar Presets_1 = tslib_1.__importDefault(require(\"./Presets\"));\nvar Preset_1 = tslib_1.__importDefault(require(\"./Preset\"));\nvar Analytics_1 = tslib_1.__importDefault(require(\"./Analytics\"));\nvar Stopwords_1 = tslib_1.__importDefault(require(\"./Stopwords\"));\nvar Stopword_1 = tslib_1.__importDefault(require(\"./Stopword\"));\nvar Conversations_1 = tslib_1.__importDefault(require(\"./Conversations\"));\nvar Conversation_1 = tslib_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.stats = new Stats_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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Documents_1 = tslib_1.__importDefault(require(\"./Documents\"));\nvar Errors_1 = require(\"./Errors\");\nvar Overrides_1 = tslib_1.__importDefault(require(\"./Overrides\"));\nvar Override_1 = tslib_1.__importDefault(require(\"./Override\"));\nvar Synonyms_1 = tslib_1.__importDefault(require(\"./Synonyms\"));\nvar Synonym_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Collection.prototype.update = function (schema) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.patch(this.endpointPath(), schema)];\n });\n });\n };\n Collection.prototype.delete = function (options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), options)];\n });\n });\n };\n Collection.prototype.exists = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var e_1;\n return tslib_1.__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(encodeURIComponent(this.name));\n };\n return Collection;\n}());\nexports.default = Collection;\n//# sourceMappingURL=Collection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(RESOURCEPATH, schema, options)];\n });\n });\n };\n Collections.prototype.retrieve = function (options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH, options)];\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar logger = tslib_1.__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 (tslib_1.__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 !== undefined && options.numRetries >= 0\n ? options.numRetries\n : this.nodes.length + (this.nearestNode == null ? 0 : 1)) || 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.axiosAdapter = options.axiosAdapter;\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.paramsSerializer = options.paramsSerializer;\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Conversations_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Conversation.prototype.update = function (params) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n Conversation.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.id));\n };\n return Conversation;\n}());\nexports.default = Conversation;\n//# sourceMappingURL=Conversation.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar ConversationModels_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.put(this.endpointPath(), params)];\n });\n });\n };\n ConversationModel.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n ConversationModel.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.id));\n };\n return ConversationModel;\n}());\nexports.default = ConversationModel;\n//# sourceMappingURL=ConversationModel.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(this.endpointPath(), params)];\n });\n });\n };\n ConversationModels.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar ConversationModels_1 = tslib_1.__importDefault(require(\"./ConversationModels\"));\nvar ConversationModel_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/debug\";\nvar Debug = /** @class */ (function () {\n function Debug(apiCall) {\n this.apiCall = apiCall;\n }\n Debug.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Document = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Documents_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Document.prototype.delete = function (options) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.delete(this.endpointPath(), options)];\n });\n });\n };\n Document.prototype.update = function (partialDocument, options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Documents_1.default.RESOURCEPATH, \"/\").concat(encodeURIComponent(this.documentId));\n };\n return Document;\n}());\nexports.Document = Document;\n//# sourceMappingURL=Document.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arrayableParams = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Errors_1 = require(\"./Errors\");\nvar SearchOnlyDocuments_1 = require(\"./SearchOnlyDocuments\");\nexports.arrayableParams = {\n query_by: \"query_by\",\n query_by_weights: \"query_by_weights\",\n facet_by: \"facet_by\",\n group_by: \"group_by\",\n include_fields: \"include_fields\",\n exclude_fields: \"exclude_fields\",\n highlight_fields: \"highlight_fields\",\n highlight_full_fields: \"highlight_full_fields\",\n pinned_hits: \"pinned_hits\",\n hidden_hits: \"hidden_hits\",\n infix: \"infix\",\n override_tags: \"override_tags\",\n num_typos: \"num_typos\",\n prefix: \"prefix\",\n sort_by: \"sort_by\",\n};\nvar isNodeJSEnvironment = typeof process !== \"undefined\" &&\n process.versions != null &&\n process.versions.node != null;\nvar Documents = /** @class */ (function (_super) {\n tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return tslib_1.__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 (error instanceof RangeError &&\n error.message.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 enableKeepAlive: isNodeJSEnvironment ? true : false, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\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 * Imports documents from a NodeJS readable stream of JSONL.\n */\n Documents.prototype.importStream = function (readableStream, options) {\n if (options === void 0) { options = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var resultsInJSONLFormat, resultsInJSONFormat, failedItems;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.apiCall.performRequest(\"post\", this.endpointPath(\"import\"), {\n queryParameters: options,\n bodyParameters: readableStream,\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 enableKeepAlive: isNodeJSEnvironment ? true : false, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\n })];\n case 1:\n resultsInJSONLFormat = _a.sent();\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 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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar HTTPError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ImportError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar MissingConfigurationError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ObjectAlreadyExists = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ObjectNotFound = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ObjectUnprocessable = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar RequestMalformed = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar RequestUnauthorized = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nvar ServerError = /** @class */ (function (_super) {\n tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar TypesenseError = /** @class */ (function (_super) {\n tslib_1.__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\";\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 tslib_1 = require(\"tslib\");\nvar HTTPError_1 = tslib_1.__importDefault(require(\"./HTTPError\"));\nexports.HTTPError = HTTPError_1.default;\nvar MissingConfigurationError_1 = tslib_1.__importDefault(require(\"./MissingConfigurationError\"));\nexports.MissingConfigurationError = MissingConfigurationError_1.default;\nvar ObjectAlreadyExists_1 = tslib_1.__importDefault(require(\"./ObjectAlreadyExists\"));\nexports.ObjectAlreadyExists = ObjectAlreadyExists_1.default;\nvar ObjectNotFound_1 = tslib_1.__importDefault(require(\"./ObjectNotFound\"));\nexports.ObjectNotFound = ObjectNotFound_1.default;\nvar ObjectUnprocessable_1 = tslib_1.__importDefault(require(\"./ObjectUnprocessable\"));\nexports.ObjectUnprocessable = ObjectUnprocessable_1.default;\nvar RequestMalformed_1 = tslib_1.__importDefault(require(\"./RequestMalformed\"));\nexports.RequestMalformed = RequestMalformed_1.default;\nvar RequestUnauthorized_1 = tslib_1.__importDefault(require(\"./RequestUnauthorized\"));\nexports.RequestUnauthorized = RequestUnauthorized_1.default;\nvar ServerError_1 = tslib_1.__importDefault(require(\"./ServerError\"));\nexports.ServerError = ServerError_1.default;\nvar ImportError_1 = tslib_1.__importDefault(require(\"./ImportError\"));\nexports.ImportError = ImportError_1.default;\nvar TypesenseError_1 = tslib_1.__importDefault(require(\"./TypesenseError\"));\nexports.TypesenseError = TypesenseError_1.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/health\";\nvar Health = /** @class */ (function () {\n function Health(apiCall) {\n this.apiCall = apiCall;\n }\n Health.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Keys_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Key.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.id));\n };\n return Key;\n}());\nexports.default = Key;\n//# sourceMappingURL=Key.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar crypto_1 = require(\"crypto\");\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.post(Keys.RESOURCEPATH, params)];\n });\n });\n };\n Keys.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 normalizedParams = (0, Utils_1.normalizeArrayableParams)(parameters);\n var paramsJSON = JSON.stringify(normalizedParams);\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/metrics.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RequestWithCache_1 = tslib_1.__importDefault(require(\"./RequestWithCache\"));\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var additionalHeaders, additionalQueryParams, queryParams, normalizedSearchRequests, normalizedQueryParams;\n return tslib_1.__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 = tslib_1.__assign(tslib_1.__assign({}, commonParams), additionalQueryParams);\n normalizedSearchRequests = {\n searches: searchRequests.searches.map(Utils_1.normalizeArrayableParams),\n };\n normalizedQueryParams = (0, Utils_1.normalizeArrayableParams)(queryParams);\n return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [\n RESOURCEPATH,\n normalizedSearchRequests,\n normalizedQueryParams,\n additionalHeaders,\n ], { cacheResponseForSeconds: cacheSearchResultsForSeconds })];\n });\n });\n };\n return MultiSearch;\n}());\nexports.default = MultiSearch;\n//# sourceMappingURL=MultiSearch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Overrides_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Override.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Overrides_1.default.RESOURCEPATH, \"/\").concat(encodeURIComponent(this.overrideId));\n };\n return Override;\n}());\nexports.default = Override;\n//# sourceMappingURL=Override.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Presets_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Preset.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.presetId));\n };\n return Preset;\n}());\nexports.default = Preset;\n//# sourceMappingURL=Preset.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var normalizedParams_1, normalizedParams;\n return tslib_1.__generator(this, function (_a) {\n if (typeof params.value === \"object\" && \"searches\" in params.value) {\n normalizedParams_1 = params.value.searches.map(function (search) {\n return (0, Utils_1.normalizeArrayableParams)(search);\n });\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), {\n value: { searches: normalizedParams_1 },\n })];\n }\n normalizedParams = (0, Utils_1.normalizeArrayableParams)(params.value);\n return [2 /*return*/, this.apiCall.put(this.endpointPath(presetId), {\n value: normalizedParams,\n })];\n });\n });\n };\n Presets.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__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 tslib_1.__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, tslib_1.__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, tslib_1.__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 if (oldestEntry) {\n this.responseCache.delete(oldestEntry);\n }\n }\n isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n oldestEntry = this.responsePromiseCache.keys().next().value;\n if (oldestEntry) {\n this.responsePromiseCache.delete(oldestEntry);\n }\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RequestWithCache;\n}());\nexports.default = RequestWithCache;\n//# sourceMappingURL=RequestWithCache.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Configuration_1 = tslib_1.__importDefault(require(\"./Configuration\"));\nvar ApiCall_1 = tslib_1.__importDefault(require(\"./ApiCall\"));\nvar MultiSearch_1 = tslib_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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchOnlyDocuments = void 0;\nvar tslib_1 = require(\"tslib\");\nvar RequestWithCache_1 = tslib_1.__importDefault(require(\"./RequestWithCache\"));\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Utils_1 = require(\"./Utils\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n var additionalQueryParams, normalizedParams, queryParams;\n return tslib_1.__generator(this, function (_e) {\n additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n normalizedParams = (0, Utils_1.normalizeArrayableParams)(searchParameters);\n queryParams = Object.assign({}, additionalQueryParams, normalizedParams);\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar RESOURCEPATH = \"/stats.json\";\nvar Metrics = /** @class */ (function () {\n function Metrics(apiCall) {\n this.apiCall = apiCall;\n }\n Metrics.prototype.retrieve = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(RESOURCEPATH)];\n });\n });\n };\n return Metrics;\n}());\nexports.default = Metrics;\n//# sourceMappingURL=Stats.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Stopwords_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Stopword.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.stopwordId));\n };\n return Stopword;\n}());\nexports.default = Stopword;\n//# sourceMappingURL=Stopword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 ? \"\" : \"/\" + encodeURIComponent(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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_1.__importDefault(require(\"./Collections\"));\nvar Synonyms_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, this.apiCall.get(this.endpointPath())];\n });\n });\n };\n Synonym.prototype.delete = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Synonyms_1.default.RESOURCEPATH, \"/\").concat(encodeURIComponent(this.synonymId));\n };\n return Synonym;\n}());\nexports.default = Synonym;\n//# sourceMappingURL=Synonym.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Collections_1 = tslib_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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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 tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__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(encodeURIComponent(this.collectionName)).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? \"\" : \"/\" + encodeURIComponent(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","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizeArrayableParams = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Documents_1 = require(\"./Documents\");\nfunction hasNoArrayValues(params) {\n return Object.keys(Documents_1.arrayableParams)\n .filter(function (key) { return params[key] !== undefined; })\n .every(function (key) { return isNonArrayValue(params[key]); });\n}\nfunction normalizeArrayableParams(params) {\n var result = tslib_1.__assign({}, params);\n var transformedValues = Object.keys(Documents_1.arrayableParams)\n .filter(function (key) { return Array.isArray(result[key]); })\n .map(function (key) {\n result[key] = result[key].join(\",\");\n return key;\n });\n if (!transformedValues.length && hasNoArrayValues(result)) {\n return result;\n }\n if (!hasNoArrayValues(result)) {\n throw new Error(\"Failed to normalize arrayable params: \".concat(JSON.stringify(result)));\n }\n return result;\n}\nexports.normalizeArrayableParams = normalizeArrayableParams;\nfunction isNonArrayValue(value) {\n return !Array.isArray(value);\n}\n//# sourceMappingURL=Utils.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","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar 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\nexport function __extends(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\nexport var __assign = function() {\n __assign = Object.assign || function __assign(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)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __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});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(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}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.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};","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 != null) {\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","tslib_1","Client_1","__importDefault","default","SearchClient_1","__importStar","Object","defineProperty","value","Aliases_1","Alias","apiCall","retrieve","__awaiter","__generator","_a","get","endpointPath","delete","concat","RESOURCEPATH","Aliases","upsert","mapping","put","aliasName","enumerable","configurable","AnalyticsRules_1","AnalyticsRule_1","AnalyticsEvents_1","Analytics","individualAnalyticsRules","_analyticsRules","_analyticsEvents","rules","id","events","AnalyticsEvents","create","params","post","operation","AnalyticsRule","AnalyticsRules","axios_1","http_1","https_1","Errors_1","TypesenseError_1","HEALTHY","isNodeJSEnvironment","process","versions","node","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","bodyParameters","patch","requestType","_f","_g","_h","_j","_k","_l","skipConnectionTimeout","_m","enableKeepAlive","requestNumber","lastException","wasAborted","_loop_1","this_1","numTries","state_1","_o","label","validate","Date","now","abortListener","requestOptions","cancelToken","source_1","response","error_1","_p","getNextNode","index","aborted","Promise","reject","Error","trys","push","adapter","axiosAdapter","url","uriFor","headers","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","Agent","keepAlive","warn","httpsAgent","paramsSerializer","CancelToken","source","cancel","addEventListener","token","sent","setNodeHealthcheck","resolve","customErrorForResponse","message","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","Stats_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","Stopwords_1","Stopword_1","Conversations_1","Conversation_1","Client","options","metrics","stats","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","Configuration","setDefaultPathInNode","setDefaultPortInNode","__assign","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","MissingConfigurationError","isNodeMissingAnyParameters","some","every","key","hasOwnProperty","masterNode","readReplicaNodes","array","j","Math","floor","random","Conversation","ConversationModels_1","ConversationModel","ConversationModels","ConversationModel_1","Conversations","individualConversationModels","_conversationsModels","models","Debug","partialDocument","arrayableParams","SearchOnlyDocuments_1","query_by","query_by_weights","facet_by","group_by","include_fields","exclude_fields","highlight_fields","highlight_full_fields","pinned_hits","hidden_hits","infix","override_tags","num_typos","prefix","sort_by","Documents","_super","__extends","action","query","createMany","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","Array","isArray","RangeError","includes","split","r","filter","success","ImportError","importStream","readableStream","export","exportStream","SearchOnlyDocuments","importResults","TypesenseError","_newTarget","constructor","setPrototypeOf","HTTPError_1","MissingConfigurationError_1","ObjectAlreadyExists_1","ObjectNotFound_1","ObjectUnprocessable_1","RequestMalformed_1","RequestUnauthorized_1","ServerError_1","ImportError_1","Health","Key","crypto_1","Utils_1","Keys","generateScopedSearchKey","searchKey","parameters","normalizedParams","normalizeArrayableParams","paramsJSON","digest","Buffer","from","createHmac","keyPrefix","substr","rawScopedKey","toString","Metrics","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","clearCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","normalizedSearchRequests","normalizedQueryParams","searches","cacheResponseForSeconds","Operations","operationName","Override","Overrides","Preset","presetId","Presets","normalizedParams_1","search","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","__spreadArray","requestTimestamp","set","size","next","SearchOnlyCollection_1","SearchClient","entries","SearchOnlyCollection","searchParameters","Stopword","stopwordId","Stopwords","Synonym","Synonyms","hasNoArrayValues","result","_typeof","_regeneratorRuntime","__esModule","t","n","o","Symbol","a","iterator","c","asyncIterator","u","toStringTag","writable","wrap","Generator","Context","makeInvokeMethod","tryCatch","type","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","then","callInvokeWithMethodAndArg","done","delegate","maybeInvokeDelegate","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","__proto__","awrap","async","reverse","pop","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","fn","thisArg","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","nextTick","utils$1","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","b","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","position","String","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","m","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","fulfilled","rejected","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","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","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","body","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","desc","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","extendStatics","__","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","decorators","getOwnPropertyDescriptor","Reflect","decorate","__param","paramIndex","decorator","__esDecorate","ctor","descriptorIn","contextIn","initializers","extraInitializers","accept","access","addInitializer","init","__runInitializers","useValue","__propKey","x","__setFunctionName","__metadata","metadataKey","metadataValue","metadata","_arguments","P","generator","step","ops","Iterator","verb","op","__createBinding","k","k2","__exportStar","__values","__read","ar","__spread","__spreadArrays","il","jl","to","pack","__asyncGenerator","q","resume","fulfill","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__setModuleDefault","ownKeys","mod","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__addDisposableResource","dispose","inner","asyncDispose","_SuppressedError","SuppressedError","suppressed","__disposeResources","fail","hasError","__rewriteRelativeImportExtension","preserveJsx","tsx","ext","cm","__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","queryBy","preset","sortBy","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","sourceSymbolKeys","_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","_adaptFacetBy","filter_by","_adaptFilters","max_facet_values","maxValuesPerFacet","page","hitsPerPage","per_page","facetQuery","facet_query","facetName","_adaptRulesContextsToOverrideTags","typesenseVectorQuery","vector_query","sortByOption","fromEntries","_callee","_searches$","_searches$2","_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","_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","_adaptedResult$facetO","facetOrdering","order","Set","fc","facet_counts","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 From ef53d13f5cd23dc83176046ff16c1659a5f4aca5 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 16 Jan 2025 15:53:23 +0200 Subject: [PATCH 3/7] ci: add puppeteer dependencies to github actions workflow - add system dependencies required for running puppeteer tests - install chromium-browser for headless testing - configure artifact upload for screenshots --- .github/workflows/tests.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b43f2a8..3e92354 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,9 +11,31 @@ jobs: with: node-version: 18 cache: npm + + - name: Install Puppeteer dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libnss3 \ + libnspr4 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libcups2 \ + libdrm2 \ + libxkbcommon0 \ + libxcomposite1 \ + libxdamage1 \ + libxfixes3 \ + libxrandr2 \ + libgbm1 \ + libasound2 + sudo apt update + sudo apt install -y chromium-browser + - run: npm ci - run: npm run build - run: npm test -- --ci --color + - uses: actions/upload-artifact@v3 with: name: screenshots From 9f245fdfc7fefa6153b66eacc75907a01d446182 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 16 Jan 2025 15:55:48 +0200 Subject: [PATCH 4/7] ci: libasound package name --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e92354..82d1bc2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,7 +28,7 @@ jobs: libxfixes3 \ libxrandr2 \ libgbm1 \ - libasound2 + libasound2t64 sudo apt update sudo apt install -y chromium-browser From 6c20e095de9b21e2620bb2b4452ed2230e0bd031 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 16 Jan 2025 16:05:02 +0200 Subject: [PATCH 5/7] ci(tests): improve chrome setup in github actions - replace manual chrome installation with `browser-actions/setup-chrome` - add `xvfb-run` for headless browser testing - configure chrome path in `jest-puppeteer.config.js` - ensure screenshots are always uploaded even on test failure --- .github/workflows/tests.yml | 39 ++++++++++++++++--------------------- jest-puppeteer.config.js | 5 +++-- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 82d1bc2..ba8a163 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,36 +7,31 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 cache: npm - - name: Install Puppeteer dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - libnss3 \ - libnspr4 \ - libatk1.0-0 \ - libatk-bridge2.0-0 \ - libcups2 \ - libdrm2 \ - libxkbcommon0 \ - libxcomposite1 \ - libxdamage1 \ - libxfixes3 \ - libxrandr2 \ - libgbm1 \ - libasound2t64 - sudo apt update - sudo apt install -y chromium-browser + - uses: browser-actions/setup-chrome@v1 + id: setup-chrome + with: + chrome-version: stable + install-dependencies: true + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build - - run: npm ci - - run: npm run build - - run: npm test -- --ci --color + - name: Run tests + env: + CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }} + run: xvfb-run --auto-servernum npm test -- --ci --color - uses: actions/upload-artifact@v3 + if: always() with: name: screenshots path: screenshots/ diff --git a/jest-puppeteer.config.js b/jest-puppeteer.config.js index cb08067..fe6819b 100644 --- a/jest-puppeteer.config.js +++ b/jest-puppeteer.config.js @@ -1,12 +1,13 @@ const isDebugMode = process.env.NODE_OPTIONS && process.env.NODE_OPTIONS.includes("javascript-debugger"); + module.exports = { launch: { dumpio: true, - // headless: process.env.HEADLESS === "true" || process.env.CI === "true", headless: isDebugMode ? false : true, slowMo: 10, defaultViewport: null, - // devtools: true + executablePath: process.env.CHROME_PATH, + args: ["--no-sandbox", "--disable-setuid-sandbox"], }, server: [ { From 6e0ba03e0cf30b7dfc16c0ee2afbc22b940f0522 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 16 Jan 2025 16:10:01 +0200 Subject: [PATCH 6/7] ci: use manual chrome installation https://github.com/browser-actions/setup-chrome/issues/618#issuecomment-2488941465 --- .github/workflows/tests.yml | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ba8a163..5f8110c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,17 +7,37 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 with: node-version: 18 cache: npm - - uses: browser-actions/setup-chrome@v1 - id: setup-chrome - with: - chrome-version: stable - install-dependencies: true + - name: Install Puppeteer dependencies + run: | + sudo apt-get update + sudo apt install -y --no-install-recommends \ + libnss3 \ + libdbus-1-3 \ + libatk1.0-0 \ + libasound2t64 \ + libxrandr2 \ + libxkbcommon-dev \ + libxfixes3 \ + libxcomposite1 \ + libxdamage1 \ + libgbm-dev \ + libatk-bridge2.0-0 \ + binutils \ + libglib2.0-0 \ + libgdk-pixbuf2.0-0 \ + libgtk-3-0 \ + libnss3-dev \ + libxss-dev \ + xvfb \ + fonts-liberation \ + libu2f-udev \ + xdg-utils \ + chromium-browser - name: Install dependencies run: npm ci @@ -26,9 +46,7 @@ jobs: run: npm run build - name: Run tests - env: - CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }} - run: xvfb-run --auto-servernum npm test -- --ci --color + - run: npm test -- --ci --color - uses: actions/upload-artifact@v3 if: always() From 5d9fb36375dd74c0df48442ede164e1bb1a37303 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Thu, 16 Jan 2025 16:11:00 +0200 Subject: [PATCH 7/7] ci: fix typo --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5f8110c..98a027a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,7 +46,7 @@ jobs: run: npm run build - name: Run tests - - run: npm test -- --ci --color + run: npm test -- --ci --color - uses: actions/upload-artifact@v3 if: always()