1(self.webpackChunkredbarrelsgames=self.webpackChunkredbarrelsgames||[]).push([["vendors-node_modules_meilisearch_dist_bundles_meilisearch_umd_js"],{
vendor: 7,856 bytes, line 1
1"./node_modules/cross-fetch/dist/browser-polyfill.js":function(){!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in t,a="ArrayBuffer"in t;if(a)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function d(t){return"string"!=typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function v(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function l(t){var e=new FileReader,r=v(e);return e.readAsArrayBuffer(t),r}function _(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=_(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||o(t))?this._bodyArrayBuffer=_(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var t,e,r,n=f(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=v(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=c(t),e=d(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[c(t)]},p.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},p.prototype.set=function(t,e){this.map[c(t)]=d(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),h(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),h(t)},n&&(p.prototype[Symbol.iterator]=p.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(t,e){var r,n,i=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),w.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function b(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function x(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:""});return t.type="error",t};var g=[301,302,303,307,308];x.redirect=function(t,e){if(-1===g.indexOf(e))throw new RangeError("Invalid status code");return new x(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function k(t,r){return new Promise((function(n,s){var a=new m(t,r);if(a.signal&&a.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function o(){u.abort()}u.onload=function(){var t,e,r={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var i="response"in u?u.response:u.responseText;n(new x(i,r))},u.onerror=function(){s(new TypeError("Network request failed"))},u.ontimeout=function(){s(new TypeError("Network request failed"))},u.onabort=function(){s(new e.DOMException("Aborted","AbortError"))},u.open(a.method,a.url,!0),"include"===a.credentials?u.withCredentials=!0:"omit"===a.credentials&&(u.withCredentials=!1),"responseType"in u&&i&&(u.responseType="blob"),a.headers.forEach((function(t,e){u.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",o),u.onreadystatechange=function(){4===u.readyState&&a.signal.removeEventListener("abort",o)}),u.send(void 0===a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,t.fetch||(t.fetch=k,t.Headers=p,t.Request=m,t.Response=x),e.Headers=p,e.Request=m,e.Response=x,e.fetch=k,Object.defineProperty(e,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},
vendor: 69,704 bytes, line 1
1"./node_modules/meilisearch/dist/bundles/meilisearch.umd.js":function(t,e,r){!function(t){"use strict";var e={ALL:"all",LAST:"last"},n={JSON:"application/json",CSV:"text/csv",NDJSON:"application/x-ndjson"},i={TASK_SUCCEEDED:"succeeded",TASK_PROCESSING:"processing",TASK_FAILED:"failed",TASK_ENQUEUED:"enqueued",TASK_CANCELED:"canceled"},s={DOCUMENTS_ADDITION_OR_UPDATE:"documentAdditionOrUpdate",DOCUMENT_DELETION:"documentDeletion",DUMP_CREATION:"dumpCreation",INDEX_CREATION:"indexCreation",INDEX_DELETION:"indexDeletion",INDEXES_SWAP:"indexSwap",INDEX_UPDATE:"indexUpdate",SETTINGS_UPDATE:"settingsUpdate",SNAPSHOT_CREATION:"snapshotCreation",TASK_CANCELATION:"taskCancelation",TASK_DELETION:"taskDeletion"},a={INDEX_CREATION_FAILED:"index_creation_failed",MISSING_INDEX_UID:"missing_index_uid",INDEX_ALREADY_EXISTS:"index_already_exists",INDEX_NOT_FOUND:"index_not_found",INVALID_INDEX_UID:"invalid_index_uid",INDEX_NOT_ACCESSIBLE:"index_not_accessible",INVALID_INDEX_OFFSET:"invalid_index_offset",INVALID_INDEX_LIMIT:"invalid_index_limit",INVALID_STATE:"invalid_state",PRIMARY_KEY_INFERENCE_FAILED:"primary_key_inference_failed",INDEX_PRIMARY_KEY_ALREADY_EXISTS:"index_primary_key_already_exists",INVALID_INDEX_PRIMARY_KEY:"invalid_index_primary_key",DOCUMENTS_FIELDS_LIMIT_REACHED:"document_fields_limit_reached",MISSING_DOCUMENT_ID:"missing_document_id",INVALID_DOCUMENT_ID:"invalid_document_id",INVALID_CONTENT_TYPE:"invalid_content_type",MISSING_CONTENT_TYPE:"missing_content_type",INVALID_DOCUMENT_FIELDS:"invalid_document_fields",INVALID_DOCUMENT_LIMIT:"invalid_document_limit",INVALID_DOCUMENT_OFFSET:"invalid_document_offset",INVALID_DOCUMENT_FILTER:"invalid_document_filter",MISSING_DOCUMENT_FILTER:"missing_document_filter",INVALID_DOCUMENT_VECTORS_FIELD:"invalid_document_vectors_field",PAYLOAD_TOO_LARGE:"payload_too_large",MISSING_PAYLOAD:"missing_payload",MALFORMED_PAYLOAD:"malformed_payload",NO_SPACE_LEFT_ON_DEVICE:"no_space_left_on_device",INVALID_STORE_FILE:"invalid_store_file",INVALID_RANKING_RULES:"missing_document_id",INVALID_REQUEST:"invalid_request",INVALID_DOCUMENT_GEO_FIELD:"invalid_document_geo_field",INVALID_SEARCH_Q:"invalid_search_q",INVALID_SEARCH_OFFSET:"invalid_search_offset",INVALID_SEARCH_LIMIT:"invalid_search_limit",INVALID_SEARCH_PAGE:"invalid_search_page",INVALID_SEARCH_HITS_PER_PAGE:"invalid_search_hits_per_page",INVALID_SEARCH_ATTRIBUTES_TO_RETRIEVE:"invalid_search_attributes_to_retrieve",INVALID_SEARCH_ATTRIBUTES_TO_CROP:"invalid_search_attributes_to_crop",INVALID_SEARCH_CROP_LENGTH:"invalid_search_crop_length",INVALID_SEARCH_ATTRIBUTES_TO_HIGHLIGHT:"invalid_search_attributes_to_highlight",INVALID_SEARCH_SHOW_MATCHES_POSITION:"invalid_search_show_matches_position",INVALID_SEARCH_FILTER:"invalid_search_filter",INVALID_SEARCH_SORT:"invalid_search_sort",INVALID_SEARCH_FACETS:"invalid_search_facets",INVALID_SEARCH_HIGHLIGHT_PRE_TAG:"invalid_search_highlight_pre_tag",INVALID_SEARCH_HIGHLIGHT_POST_TAG:"invalid_search_highlight_post_tag",INVALID_SEARCH_CROP_MARKER:"invalid_search_crop_marker",INVALID_SEARCH_MATCHING_STRATEGY:"invalid_search_matching_strategy",INVALID_SEARCH_VECTOR:"invalid_search_vector",INVALID_SEARCH_ATTRIBUTES_TO_SEARCH_ON:"invalid_search_attributes_to_search_on",BAD_REQUEST:"bad_request",DOCUMENT_NOT_FOUND:"document_not_found",INTERNAL:"internal",INVALID_API_KEY:"invalid_api_key",INVALID_API_KEY_DESCRIPTION:"invalid_api_key_description",INVALID_API_KEY_ACTIONS:"invalid_api_key_actions",INVALID_API_KEY_INDEXES:"invalid_api_key_indexes",INVALID_API_KEY_EXPIRES_AT:"invalid_api_key_expires_at",API_KEY_NOT_FOUND:"api_key_not_found",IMMUTABLE_API_KEY_UID:"immutable_api_key_uid",IMMUTABLE_API_KEY_ACTIONS:"immutable_api_key_actions",IMMUTABLE_API_KEY_INDEXES:"immutable_api_key_indexes",IMMUTABLE_API_KEY_EXPIRES_AT:"immutable_api_key_expires_at",IMMUTABLE_API_KEY_CREATED_AT:"immutable_api_key_created_at",IMMUTABLE_API_KEY_UPDATED_AT:"immutable_api_key_updated_at",MISSING_AUTHORIZATION_HEADER:"missing_authorization_header",UNRETRIEVABLE_DOCUMENT:"unretrievable_document",MAX_DATABASE_SIZE_LIMIT_REACHED:"database_size_limit_reached",TASK_NOT_FOUND:"task_not_found",DUMP_PROCESS_FAILED:"dump_process_failed",DUMP_NOT_FOUND:"dump_not_found",INVALID_SWAP_DUPLICATE_INDEX_FOUND:"invalid_swap_duplicate_index_found",INVALID_SWAP_INDEXES:"invalid_swap_indexes",MISSING_SWAP_INDEXES:"missing_swap_indexes",MISSING_MASTER_KEY:"missing_master_key",INVALID_TASK_TYPES:"invalid_task_types",INVALID_TASK_UIDS:"invalid_task_uids",INVALID_TASK_STATUSES:"invalid_task_statuses",INVALID_TASK_LIMIT:"invalid_task_limit",INVALID_TASK_FROM:"invalid_task_from",INVALID_TASK_CANCELED_BY:"invalid_task_canceled_by",MISSING_TASK_FILTERS:"missing_task_filters",TOO_MANY_OPEN_FILES:"too_many_open_files",IO_ERROR:"io_error",INVALID_TASK_INDEX_UIDS:"invalid_task_index_uids",IMMUTABLE_INDEX_UID:"immutable_index_uid",IMMUTABLE_INDEX_CREATED_AT:"immutable_index_created_at",IMMUTABLE_INDEX_UPDATED_AT:"immutable_index_updated_at",INVALID_SETTINGS_DISPLAYED_ATTRIBUTES:"invalid_settings_displayed_attributes",INVALID_SETTINGS_SEARCHABLE_ATTRIBUTES:"invalid_settings_searchable_attributes",INVALID_SETTINGS_FILTERABLE_ATTRIBUTES:"invalid_settings_filterable_attributes",INVALID_SETTINGS_SORTABLE_ATTRIBUTES:"invalid_settings_sortable_attributes",INVALID_SETTINGS_RANKING_RULES:"invalid_settings_ranking_rules",INVALID_SETTINGS_STOP_WORDS:"invalid_settings_stop_words",INVALID_SETTINGS_SYNONYMS:"invalid_settings_synonyms",INVALID_SETTINGS_DISTINCT_ATTRIBUTE:"invalid_settings_distinct_attribute",INVALID_SETTINGS_TYPO_TOLERANCE:"invalid_settings_typo_tolerance",INVALID_SETTINGS_FACETING:"invalid_settings_faceting",INVALID_SETTINGS_PAGINATION:"invalid_settings_pagination",INVALID_TASK_BEFORE_ENQUEUED_AT:"invalid_task_before_enqueued_at",INVALID_TASK_AFTER_ENQUEUED_AT:"invalid_task_after_enqueued_at",INVALID_TASK_BEFORE_STARTED_AT:"invalid_task_before_started_at",INVALID_TASK_AFTER_STARTED_AT:"invalid_task_after_started_at",INVALID_TASK_BEFORE_FINISHED_AT:"invalid_task_before_finished_at",INVALID_TASK_AFTER_FINISHED_AT:"invalid_task_after_finished_at",MISSING_API_KEY_ACTIONS:"missing_api_key_actions",MISSING_API_KEY_INDEXES:"missing_api_key_indexes",MISSING_API_KEY_EXPIRES_AT:"missing_api_key_expires_at",INVALID_API_KEY_LIMIT:"invalid_api_key_limit",INVALID_API_KEY_OFFSET:"invalid_api_key_offset",INVALID_FACET_SEARCH_FACET_NAME:"invalid_facet_search_facet_name",MISSING_FACET_SEARCH_FACET_NAME:"missing_facet_search_facet_name",INVALID_FACET_SEARCH_FACET_QUERY:"invalid_facet_search_facet_query"};function u(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,s,a,u=[],o=!0,c=!1;try{if(s=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;o=!1}else for(;!(o=(n=s.call(r)).done)&&(u.push(n.value),u.length!==e);o=!0);}catch(t){c=!0,i=t}finally{try{if(!o&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var s=e&&e.prototype instanceof w?e:w,a=Object.create(s.prototype),u=new N(n||[]);return i(a,"_invoke",{value:T(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var f="suspendedStart",v="suspendedYield",l="executing",_="completed",y={};function w(){}function m(){}function b(){}var x={};d(x,a,(function(){return this}));var g=Object.getPrototypeOf,k=g&&g(g(O([])));k&&k!==r&&n.call(k,a)&&(x=k);var A=b.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function r(i,s,a,u){var o=p(t[i],t,s);if("throw"!==o.type){var c=o.arg,d=c.value;return d&&"object"==typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(o.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=f;return function(s,a){if(i===l)throw new Error("Generator is already running");if(i===_){if("throw"===s)throw a;return{value:t,done:!0}}for(n.method=s,n.arg=a;;){var u=n.delegate;if(u){var o=S(u,n);if(o){if(o===y)continue;return o}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=l;var c=p(e,r,n);if("normal"===c.type){if(i=n.done?_:v,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=_,n.method="throw",n.arg=c.arg)}}}function S(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var s=p(i,e.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,y;var a=s.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function D(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 R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(typeof e+" is not iterable")}return m.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=d(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,d(t,c,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},E(I.prototype),d(I.prototype,u,(function(){return this})),e.AsyncIterator=I,e.async=function(t,r,n,i,s){void 0===s&&(s=Promise);var a=new I(h(t,r,n,i),s);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(A),d(A,c,"Generator"),d(A,a,(function(){return this})),d(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var s=this.tryEntries.length-1;s>=0;--s){var a=this.tryEntries[s],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var o=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(o&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var s=i;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var a=s?s.completion:{};return a.type=t,a.arg=e,s?(this.method="next",this.next=s.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function c(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function d(t){var e=c(t,"string");return"symbol"==typeof e?e:String(e)}function h(t){return h="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},h(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function v(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,r){return(e=d(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&w(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function w(t,e){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},w(t,e)}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function b(t,e,r){return b=m()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&w(i,r.prototype),i},b.apply(null,arguments)}function x(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}function g(t){var e="function"==typeof Map?new Map:void 0;return g=function(t){if(null===t||!x(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return b(t,arguments,y(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),w(r,t)},g(t)}function k(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function A(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return k(t)}function E(t){var e=m();return function(){var r,n=y(t);if(e){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return A(this,r)}}function I(t,e){return T(t)||u(t,e)||S(t,e)||R()}function T(t){if(Array.isArray(t))return t}function S(t,e){if(t){if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function R(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=S(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw s}}}}function O(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,s){function a(t){try{o(n.next(t))}catch(t){s(t)}}function u(t){try{o(n.throw(t))}catch(t){s(t)}}function o(t){t.done?r(t.value):i(t.value).then(a,u)}o((n=n.apply(t,e||[])).next())}))}var L=function(t){_(r,t);var e=E(r);function r(t){var n;return p(this,r),n=e.call(this,t),Object.setPrototypeOf(k(n),r.prototype),n.name="MeiliSearchError",Error.captureStackTrace&&Error.captureStackTrace(k(n),r),n}return v(r)}(g(Error)),q=function(t){_(r,t);var e=E(r);function r(t,n,i,s){var a,u,o,c;return p(this,r),a=e.call(this,t),Object.setPrototypeOf(k(a),r.prototype),a.name="MeiliSearchCommunicationError",n instanceof Response&&(a.message=n.statusText,a.statusCode=n.status),n instanceof Error&&(a.errno=n.errno,a.code=n.code),s?(a.stack=s,a.stack=null===(u=a.stack)||void 0===u?void 0:u.replace(/(TypeError|FetchError)/,a.name),a.stack=null===(o=a.stack)||void 0===o?void 0:o.replace("Failed to fetch","request to ".concat(i," failed, reason: connect ECONNREFUSED")),a.stack=null===(c=a.stack)||void 0===c?void 0:c.replace("Not Found","Not Found: ".concat(i))):Error.captureStackTrace&&Error.captureStackTrace(k(a),r),a}return v(r)}(L),P=function(t){_(r,t);var e=E(r);function r(t,n){var i;return p(this,r),i=e.call(this,t.message),Object.setPrototypeOf(k(i),r.prototype),i.name="MeiliSearchApiError",i.code=t.code,i.type=t.type,i.link=t.link,i.message=t.message,i.httpStatus=n,Error.captureStackTrace&&Error.captureStackTrace(k(i),r),i}return v(r)}(L);function C(t){return O(this,void 0,void 0,o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:r=e.sent,e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(1),new q(t.statusText,t,t.url);case 10:throw new P(r,t.status);case 11:return e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,null,[[1,7]])})))}function M(t,e,r){if("MeiliSearchApiError"!==t.name)throw new q(t.message,t,r,e);throw t}var j=function(t){_(r,t);var e=E(r);function r(t){var n;return p(this,r),n=e.call(this,t),Object.setPrototypeOf(k(n),r.prototype),n.name="MeiliSearchTimeOutError",Error.captureStackTrace&&Error.captureStackTrace(k(n),r),n}return v(r)}(L);function U(t,e){return"".concat(t,"\nHint: It might not be working because maybe you're not up to date with the Meilisearch version that ").concat(e," call requires.")}function F(t){return Object.entries(t).reduce((function(t,e){var r=I(e,2),n=r[0],i=r[1];return void 0!==i&&(t[n]=i),t}),{})}function V(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,t)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))}function B(t){return t.startsWith("https://")||t.startsWith("http://")?t:"http://".concat(t)}function K(t){return t.endsWith("/")||(t+="/"),t}var G="0.38.0";function H(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return void 0===n?e:Array.isArray(n)?Object.assign(Object.assign({},e),l({},r,n.join(","))):n instanceof Date?Object.assign(Object.assign({},e),l({},r,n.toISOString())):Object.assign(Object.assign({},e),l({},r,n))}),{})}function Y(t){try{return t=K(t=B(t))}catch(t){throw new L("The provided host is not valid.")}}function X(t){if(Array.isArray(t))return t.reduce((function(t,e){return t[e[0]]=e[1],t}),{});if("has"in t){var e={};return t.forEach((function(t,r){return e[r]=t})),e}return Object.assign({},t)}function W(t){var e,r,n="X-Meilisearch-Client",i="Meilisearch JavaScript (v".concat(G,")"),s="Content-Type",a="Authorization",u=X(null!==(r=null===(e=t.requestConfig)||void 0===e?void 0:e.headers)&&void 0!==r?r:{});if(t.apiKey&&!u[a]&&(u[a]="Bearer ".concat(t.apiKey)),u[s]||(u["Content-Type"]="application/json"),t.clientAgents&&Array.isArray(t.clientAgents)){var o=t.clientAgents.concat(i);u[n]=o.join(" ; ")}else{if(t.clientAgents&&!Array.isArray(t.clientAgents))throw new L('Meilisearch: The header "'.concat(n,'" should be an array of string(s).\n'));u[n]=i}return u}var Q=function(){function t(e){p(this,t),this.headers=W(e),this.requestConfig=e.requestConfig,this.httpClient=e.httpClient,this.requestTimeout=e.timeout;try{var r=Y(e.host);this.url=new URL(r)}catch(t){throw new L("The provided host is not valid.")}}return v(t,[{key:"request",value:function(t){var e,n=t.method,i=t.url,s=t.params,a=t.body,u=t.config,c=void 0===u?{}:u;return O(this,void 0,void 0,o().mark((function t(){var u,d,h,p,f,v,l;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"==typeof fetch&&r("./node_modules/cross-fetch/dist/browser-polyfill.js"),u=new URL(i,this.url),s&&(d=new URLSearchParams,Object.keys(s).filter((function(t){return null!==s[t]})).map((function(t){return d.set(t,s[t])})),u.search=d.toString()),(null===(e=c.headers)||void 0===e?void 0:e["Content-Type"])||(a=JSON.stringify(a)),h=Object.assign(Object.assign({},this.headers),c.headers),t.prev=5,p=this.fetchWithTimeout(u.toString(),Object.assign(Object.assign(Object.assign({},c),this.requestConfig),{method:n,body:a,headers:h}),this.requestTimeout),!this.httpClient){t.next=11;break}return t.next=10,p;case 10:return t.abrupt("return",t.sent);case 11:return t.next=13,p.then((function(t){return C(t)}));case 13:return f=t.sent,t.next=16,f.json().catch((function(){}));case 16:return v=t.sent,t.abrupt("return",v);case 20:t.prev=20,t.t0=t.catch(5),l=t.t0.stack,M(t.t0,l,u.toString());case 24:case"end":return t.stop()}}),t,this,[[5,20]])})))}},{key:"fetchWithTimeout",value:function(t,e,r){return O(this,void 0,void 0,o().mark((function n(){var i=this;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise((function(n,s){var a,u=[(i.httpClient?i.httpClient:fetch)(t,e)];if(r){var o=new Promise((function(t,e){a=setTimeout((function(){e(new Error("Error: Request Timed Out"))}),r)}));u.push(o)}Promise.race(u).then(n).catch(s).finally((function(){clearTimeout(a)}))})));case 1:case"end":return n.stop()}}),n)})))}},{key:"get",value:function(t,e,r){return O(this,void 0,void 0,o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.request({method:"GET",url:t,params:e,config:r});case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(t,e,r,n){return O(this,void 0,void 0,o().mark((function i(){return o().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.request({method:"POST",url:t,body:e,params:r,config:n});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}}),i,this)})))}},{key:"put",value:function(t,e,r,n){return O(this,void 0,void 0,o().mark((function i(){return o().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.request({method:"PUT",url:t,body:e,params:r,config:n});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}}),i,this)})))}},{key:"patch",value:function(t,e,r,n){return O(this,void 0,void 0,o().mark((function i(){return o().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.request({method:"PATCH",url:t,body:e,params:r,config:n});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}}),i,this)})))}},{key:"delete",value:function(t,e,r,n){return O(this,void 0,void 0,o().mark((function i(){return o().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.request({method:"DELETE",url:t,body:e,params:r,config:n});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}}),i,this)})))}}]),t}(),J=v((function t(e){p(this,t),this.taskUid=e.taskUid,this.indexUid=e.indexUid,this.status=e.status,this.type=e.type,this.enqueuedAt=new Date(e.enqueuedAt)})),z=v((function t(e){p(this,t),this.indexUid=e.indexUid,this.status=e.status,this.type=e.type,this.uid=e.uid,this.details=e.details,this.canceledBy=e.canceledBy,this.error=e.error,this.duration=e.duration,this.startedAt=new Date(e.startedAt),this.enqueuedAt=new Date(e.enqueuedAt),this.finishedAt=new Date(e.finishedAt)})),Z=function(){function t(e){p(this,t),this.httpRequest=new Q(e)}return v(t,[{key:"getTask",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="tasks/".concat(t),e.next=3,this.httpRequest.get(r);case 3:return n=e.sent,e.abrupt("return",new z(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getTasks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="tasks",e.next=3,this.httpRequest.get(r,H(t));case 3:return n=e.sent,e.abrupt("return",Object.assign(Object.assign({},n),{results:n.results.map((function(t){return new z(t)}))}));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"waitForTask",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.timeOutMs,n=void 0===r?5e3:r,s=e.intervalMs,a=void 0===s?50:s;return O(this,void 0,void 0,o().mark((function e(){var r,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Date.now();case 1:if(!(Date.now()-r<n)){e.next=11;break}return e.next=4,this.getTask(t);case 4:if(s=e.sent,[i.TASK_ENQUEUED,i.TASK_PROCESSING].includes(s.status)){e.next=7;break}return e.abrupt("return",s);case 7:return e.next=9,V(a);case 9:e.next=1;break;case 11:throw new j("timeout of ".concat(n,"ms has exceeded on process ").concat(t," when waiting a task to be resolved."));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"waitForTasks",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.timeOutMs,n=void 0===r?5e3:r,i=e.intervalMs,s=void 0===i?50:i;return O(this,void 0,void 0,o().mark((function e(){var r,i,a,u,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],i=N(t),e.prev=2,i.s();case 4:if((a=i.n()).done){e.next=12;break}return u=a.value,e.next=8,this.waitForTask(u,{timeOutMs:n,intervalMs:s});case 8:c=e.sent,r.push(c);case 10:e.next=4;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),i.e(e.t0);case 17:return e.prev=17,i.f(),e.finish(17);case 20:return e.abrupt("return",r);case 21:case"end":return e.stop()}}),e,this,[[2,14,17,20]])})))}},{key:"cancelTasks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="tasks/cancel",e.next=3,this.httpRequest.post(r,{},H(t));case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"deleteTasks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="tasks",e.next=3,this.httpRequest.delete(r,{},H(t));case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}}]),t}(),$=function(){function t(e,r,n){p(this,t),this.uid=r,this.primaryKey=n,this.httpRequest=new Q(e),this.tasks=new Z(e)}return v(t,[{key:"search",value:function(t,e,r){return O(this,void 0,void 0,o().mark((function n(){var i;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i="indexes/".concat(this.uid,"/search"),n.next=3,this.httpRequest.post(i,F(Object.assign({q:t},e)),void 0,r);case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n,this)})))}},{key:"searchGet",value:function(t,e,r){var n,i,s,a,u,c,d;return O(this,void 0,void 0,o().mark((function h(){var p,f,v;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return p="indexes/".concat(this.uid,"/search"),f=function(t){if("string"==typeof t)return t;if(Array.isArray(t))throw new L("The filter query parameter should be in string format when using searchGet")},v=Object.assign(Object.assign({q:t},e),{filter:f(null==e?void 0:e.filter),sort:null===(n=null==e?void 0:e.sort)||void 0===n?void 0:n.join(","),facets:null===(i=null==e?void 0:e.facets)||void 0===i?void 0:i.join(","),attributesToRetrieve:null===(s=null==e?void 0:e.attributesToRetrieve)||void 0===s?void 0:s.join(","),attributesToCrop:null===(a=null==e?void 0:e.attributesToCrop)||void 0===a?void 0:a.join(","),attributesToHighlight:null===(u=null==e?void 0:e.attributesToHighlight)||void 0===u?void 0:u.join(","),vector:null===(c=null==e?void 0:e.vector)||void 0===c?void 0:c.join(","),attributesToSearchOn:null===(d=null==e?void 0:e.attributesToSearchOn)||void 0===d?void 0:d.join(",")}),o.next=5,this.httpRequest.get(p,F(v),r);case 5:return o.abrupt("return",o.sent);case 6:case"end":return o.stop()}}),h,this)})))}},{key:"searchForFacetValues",value:function(t,e){return O(this,void 0,void 0,o().mark((function r(){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="indexes/".concat(this.uid,"/facet-search"),r.next=3,this.httpRequest.post(n,F(t),void 0,e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r,this)})))}},{key:"getRawInfo",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid),t.next=3,this.httpRequest.get(e);case 3:return r=t.sent,this.primaryKey=r.primaryKey,this.updatedAt=new Date(r.updatedAt),this.createdAt=new Date(r.createdAt),t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"fetchInfo",value:function(){return O(this,void 0,void 0,o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRawInfo();case 2:return t.abrupt("return",this);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"fetchPrimaryKey",value:function(){return O(this,void 0,void 0,o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRawInfo();case 2:return this.primaryKey=t.sent.primaryKey,t.abrupt("return",this.primaryKey);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"update",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid),e.next=3,this.httpRequest.patch(r,t);case 3:return(n=e.sent).enqueuedAt=new Date(n.enqueuedAt),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"delete",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid),t.next=3,this.httpRequest.delete(e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getTasks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.getTasks(Object.assign(Object.assign({},t),{indexUids:[this.uid]}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getTask",value:function(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.getTask(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"waitForTasks",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.timeOutMs,n=void 0===r?5e3:r,i=e.intervalMs,s=void 0===i?50:i;return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.waitForTasks(t,{timeOutMs:n,intervalMs:s});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"waitForTask",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.timeOutMs,n=void 0===r?5e3:r,i=e.intervalMs,s=void 0===i?50:i;return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.waitForTask(t,{timeOutMs:n,intervalMs:s});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getStats",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/stats"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getDocuments",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function r(){var n,i,s;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===(e=F(e)).filter){r.next=15;break}return r.prev=2,n="indexes/".concat(this.uid,"/documents/fetch"),r.next=6,this.httpRequest.post(n,e);case 6:case 19:return r.abrupt("return",r.sent);case 9:throw r.prev=9,r.t0=r.catch(2),(r.t0 instanceof q||r.t0 instanceof P)&&(r.t0.message=U(r.t0.message,"getDocuments")),r.t0;case 13:r.next=20;break;case 15:return i="indexes/".concat(this.uid,"/documents"),s=Array.isArray(null==e?void 0:e.fields)?{fields:null===(t=null==e?void 0:e.fields)||void 0===t?void 0:t.join(",")}:{},r.next=19,this.httpRequest.get(i,Object.assign(Object.assign({},e),s));case 20:case"end":return r.stop()}}),r,this,[[2,9]])})))}},{key:"getDocument",value:function(t,e){return O(this,void 0,void 0,o().mark((function r(){var n,i;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="indexes/".concat(this.uid,"/documents/").concat(t),i=function(){var t;if(Array.isArray(null==e?void 0:e.fields))return null===(t=null==e?void 0:e.fields)||void 0===t?void 0:t.join(",")}(),r.next=4,this.httpRequest.get(n,F(Object.assign(Object.assign({},e),{fields:i})));case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"addDocuments",value:function(t,e){return O(this,void 0,void 0,o().mark((function r(){var n,i;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="indexes/".concat(this.uid,"/documents"),r.next=3,this.httpRequest.post(n,t,e);case 3:return i=r.sent,r.abrupt("return",new J(i));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"addDocumentsFromString",value:function(t,e,r){return O(this,void 0,void 0,o().mark((function n(){var i,s;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i="indexes/".concat(this.uid,"/documents"),n.next=3,this.httpRequest.post(i,t,r,{headers:{"Content-Type":e}});case 3:return s=n.sent,n.abrupt("return",new J(s));case 5:case"end":return n.stop()}}),n,this)})))}},{key:"addDocumentsInBatches",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,r=arguments.length>2?arguments[2]:void 0;return O(this,void 0,void 0,o().mark((function n(){var i,s;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=[],s=0;case 2:if(!(s<t.length)){n.next=11;break}return n.t0=i,n.next=6,this.addDocuments(t.slice(s,s+e),r);case 6:n.t1=n.sent,n.t0.push.call(n.t0,n.t1);case 8:s+=e,n.next=2;break;case 11:return n.abrupt("return",i);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"updateDocuments",value:function(t,e){return O(this,void 0,void 0,o().mark((function r(){var n,i;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="indexes/".concat(this.uid,"/documents"),r.next=3,this.httpRequest.put(n,t,e);case 3:return i=r.sent,r.abrupt("return",new J(i));case 5:case"end":return r.stop()}}),r,this)})))}},{key:"updateDocumentsInBatches",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,r=arguments.length>2?arguments[2]:void 0;return O(this,void 0,void 0,o().mark((function n(){var i,s;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=[],s=0;case 2:if(!(s<t.length)){n.next=11;break}return n.t0=i,n.next=6,this.updateDocuments(t.slice(s,s+e),r);case 6:n.t1=n.sent,n.t0.push.call(n.t0,n.t1);case 8:s+=e,n.next=2;break;case 11:return n.abrupt("return",i);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"updateDocumentsFromString",value:function(t,e,r){return O(this,void 0,void 0,o().mark((function n(){var i,s;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i="indexes/".concat(this.uid,"/documents"),n.next=3,this.httpRequest.put(i,t,r,{headers:{"Content-Type":e}});case 3:return s=n.sent,n.abrupt("return",new J(s));case 5:case"end":return n.stop()}}),n,this)})))}},{key:"deleteDocument",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/documents/").concat(t),e.next=3,this.httpRequest.delete(r);case 3:return(n=e.sent).enqueuedAt=new Date(n.enqueuedAt),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"deleteDocuments",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!Array.isArray(t)&&"object"===h(t),n=r?"documents/delete":"documents/delete-batch",i="indexes/".concat(this.uid,"/").concat(n),e.prev=3,e.next=6,this.httpRequest.post(i,t);case 6:return s=e.sent,e.abrupt("return",new J(s));case 10:throw e.prev=10,e.t0=e.catch(3),(e.t0 instanceof q&&r||e.t0 instanceof P)&&(e.t0.message=U(e.t0.message,"deleteDocuments")),e.t0;case 14:case"end":return e.stop()}}),e,this,[[3,10]])})))}},{key:"deleteAllDocuments",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getSettings",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateSettings",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings"),e.next=3,this.httpRequest.patch(r,t);case 3:return(n=e.sent).enqueued=new Date(n.enqueuedAt),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"resetSettings",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getPagination",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updatePagination",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/pagination"),e.next=3,this.httpRequest.patch(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetPagination",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.delete(e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getSynonyms",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateSynonyms",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/synonyms"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetSynonyms",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getStopWords",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateStopWords",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/stop-words"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetStopWords",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getRankingRules",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateRankingRules",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/ranking-rules"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetRankingRules",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getDistinctAttribute",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateDistinctAttribute",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/distinct-attribute"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetDistinctAttribute",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getFilterableAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateFilterableAttributes",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/filterable-attributes"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetFilterableAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getSortableAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateSortableAttributes",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/sortable-attributes"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetSortableAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getSearchableAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateSearchableAttributes",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/searchable-attributes"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetSearchableAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getDisplayedAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateDisplayedAttributes",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/displayed-attributes"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetDisplayedAttributes",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getTypoTolerance",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateTypoTolerance",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/typo-tolerance"),e.next=3,this.httpRequest.patch(r,t);case 3:return(n=e.sent).enqueuedAt=new Date(n.enqueuedAt),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"resetTypoTolerance",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getFaceting",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateFaceting",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/faceting"),e.next=3,this.httpRequest.patch(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetFaceting",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.delete(e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getSeparatorTokens",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateSeparatorTokens",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/separator-tokens"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetSeparatorTokens",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getNonSeparatorTokens",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateNonSeparatorTokens",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/non-separator-tokens"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetNonSeparatorTokens",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getDictionary",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateDictionary",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/dictionary"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetDictionary",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getProximityPrecision",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateProximityPrecision",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/proximity-precision"),e.next=3,this.httpRequest.put(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetProximityPrecision",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEmbedders",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updateEmbedders",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/settings/embedders"),e.next=3,this.httpRequest.patch(r,t);case 3:return n=e.sent,e.abrupt("return",new J(n));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"resetEmbedders",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.delete(e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})))}}],[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return O(this,void 0,void 0,o().mark((function n(){var i,s,a;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i="indexes",s=new Q(r),n.next=4,s.post(i,Object.assign(Object.assign({},e),{uid:t}));case 4:return a=n.sent,n.abrupt("return",new J(a));case 6:case"end":return n.stop()}}),n)})))}}]),t}(),tt=function(){function t(e){p(this,t),this.config=e,this.httpRequest=new Q(e),this.tasks=new Z(e)}return v(t,[{key:"index",value:function(t){return new $(this.config,t)}},{key:"getIndex",value:function(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new $(this.config,t).fetchInfo());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getRawIndex",value:function(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new $(this.config,t).getRawInfo());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getIndexes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){var r,n,i=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRawIndexes(t);case 2:return r=e.sent,n=r.results.map((function(t){return new $(i.config,t.uid,t.primaryKey)})),e.abrupt("return",Object.assign(Object.assign({},r),{results:n}));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getRawIndexes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes",e.next=3,this.httpRequest.get(r,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"createIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return O(this,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,$.create(t,e,this.config);case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"updateIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return O(this,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,new $(this.config,t).update(e);case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"deleteIndex",value:function(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new $(this.config,t).delete();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"deleteIndexIfExists",value:function(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.deleteIndex(t);case 3:return e.abrupt("return",!0);case 6:if(e.prev=6,e.t0=e.catch(0),e.t0.code!==a.INDEX_NOT_FOUND){e.next=10;break}return e.abrupt("return",!1);case 10:throw e.t0;case 11:case"end":return e.stop()}}),e,this,[[0,6]])})))}},{key:"swapIndexes",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="/swap-indexes",e.next=3,this.httpRequest.post(r,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"multiSearch",value:function(t,e){return O(this,void 0,void 0,o().mark((function r(){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="multi-search",r.next=3,this.httpRequest.post(n,t,void 0,e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r,this)})))}},{key:"getTasks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.getTasks(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getTask",value:function(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.getTask(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"waitForTasks",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.timeOutMs,n=void 0===r?5e3:r,i=e.intervalMs,s=void 0===i?50:i;return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.waitForTasks(t,{timeOutMs:n,intervalMs:s});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"waitForTask",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.timeOutMs,n=void 0===r?5e3:r,i=e.intervalMs,s=void 0===i?50:i;return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.waitForTask(t,{timeOutMs:n,intervalMs:s});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"cancelTasks",value:function(t){return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.cancelTasks(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"deleteTasks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.tasks.deleteTasks(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getKeys",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O(this,void 0,void 0,o().mark((function e(){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="keys",e.next=3,this.httpRequest.get(r,t);case 3:return(n=e.sent).results=n.results.map((function(t){return Object.assign(Object.assign({},t),{createdAt:new Date(t.createdAt),updatedAt:new Date(t.updatedAt)})})),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getKey",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="keys/".concat(t),e.next=3,this.httpRequest.get(r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"createKey",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="keys",e.next=3,this.httpRequest.post(r,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"updateKey",value:function(t,e){return O(this,void 0,void 0,o().mark((function r(){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="keys/".concat(t),r.next=3,this.httpRequest.patch(n,e);case 3:return r.abrupt("return",r.sent);case 4:case"end":return r.stop()}}),r,this)})))}},{key:"deleteKey",value:function(t){return O(this,void 0,void 0,o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="keys/".concat(t),e.next=3,this.httpRequest.delete(r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"health",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="health",t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"isHealthy",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e="health",t.next=4,this.httpRequest.get(e);case 4:return t.abrupt("return",!0);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",!1);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})))}},{key:"getStats",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="stats",t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getVersion",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="version",t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"createDump",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="dumps",t.next=3,this.httpRequest.post(e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"createSnapshot",value:function(){return O(this,void 0,void 0,o().mark((function t(){var e,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="snapshots",t.next=3,this.httpRequest.post(e);case 3:return r=t.sent,t.abrupt("return",new J(r));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"generateTenantToken",value:function(t,e,r){var n=new Error;throw new Error("Meilisearch: failed to generate a tenant token. Generation of a token only works in a node environment \n ".concat(n.stack,"."))}}]),t}(),et=function(t){_(r,t);var e=E(r);function r(t){return p(this,r),e.call(this,t)}return v(r)}(tt);t.ContentTypeEnum=n,t.ErrorStatusCode=a,t.Index=$,t.MatchingStrategies=e,t.MeiliSearch=et,t.MeiliSearchApiError=P,t.MeiliSearchCommunicationError=q,t.MeiliSearchError=L,t.MeiliSearchTimeOutError=j,t.Meilisearch=et,t.TaskStatus=i,t.TaskTypes=s,t.default=et,t.httpErrorHandler=M,t.httpResponseErrorHandler=C,t.versionErrorHintMessage=U,Object.defineProperty(t,"__esModule",{value:!0})}(e)}
1}]); 2//# sourceMappingURL=vendors-node_modules_meilisearch_dist_bundles_meilisearch_umd_js.dadc5f73bbcbc5670a99.bundle.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.