mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
82 KiB
1 lines
82 KiB
(self.webpackChunknoco_docs=self.webpackChunknoco_docs||[]).push([[4496],{17331:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function n(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(n(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(i(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u<s;u++)o[u].apply(this,c);return!0},t.prototype.addListener=function(e,a){var s;if(!r(a))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(a.listener)?a.listener:a),this._events[e]?i(this._events[e])?this._events[e].push(a):this._events[e]=[this._events[e],a]:this._events[e]=a,i(this._events[e])&&!this._events[e].warned&&(s=n(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var i=!1;function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},t.prototype.removeListener=function(e,t){var n,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,a=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(c=s;c-- >0;)if(n[c]===t||n[c].listener&&n[c].listener===t){a=c;break}if(a<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(i=this._events[e]))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},8131:(e,t,r)=>{"use strict";var i=r(49374),n=r(17775),a=r(23076);function s(e,t,r){return new i(e,t,r)}s.version=r(24336),s.AlgoliaSearchHelper=i,s.SearchParameters=n,s.SearchResults=a,e.exports=s},68078:(e,t,r)=>{"use strict";var i=r(17331);function n(e,t){this.main=e,this.fn=t,this.lastResults=null}r(14853)(n,i),n.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},n.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=n},82437:(e,t,r)=>{"use strict";var i=r(52344),n=r(90116),a=r(49803),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var n=""+r,a=e[t]?e[t].concat(n):[n],c={};return c[t]=a,i({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var i=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&i===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return n(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var i=!1,s=Object.keys(e).reduce((function(n,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(i=!0),n[a]=c,n}),{});return i?s:e}},isRefined:function(e,t,r){var i=Boolean(e[t])&&e[t].length>0;if(void 0===r||!i)return i;var n=""+r;return-1!==e[t].indexOf(n)}};e.exports=s},17775:(e,t,r)=>{"use strict";var i=r(52344),n=r(7888),a=r(22686),s=r(60185),c=r(90116),u=r(49803),o=r(28023),h=r(46801),l=r(82437);function f(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return f(t[r],e)})):e===t}function d(e){var t=e?d._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var i=-1!==d.PARAMETERS.indexOf(e),n=void 0!==t[e];!i&&n&&(r[e]=t[e])}))}d.PARAMETERS=Object.keys(new d),d._parseNumbers=function(e){if(e instanceof d)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var i=e[r];if("string"==typeof i){var n=parseFloat(i);t[r]=isNaN(n)?i:n}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var i=e.numericRefinements[t]||{};r[t]={},Object.keys(i).forEach((function(e){var n=i[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=n}))})),t.numericRefinements=r}return s({},e,t)},d.make=function(e){var t=new d(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},d.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},d.prototype={constructor:d,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:l.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:l.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:l.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:l.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=o(r);if(this.isNumericRefined(e,t,i))return this;var n=s({},this.numericRefinements);return n[e]=s({},n[e]),n[e][t]?(n[e][t]=n[e][t].slice(),n[e][t].push(i)):n[e][t]=[i],this.setQueryParameters({numericRefinements:n})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var i=r;return void 0!==i?this.isNumericRefined(e,t,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t&&f(r.val,o(i))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,i=Object.keys(r).reduce((function(i,n){var a=r[n],s={};return a=a||{},Object.keys(a).forEach((function(r){var i=a[r]||[],c=[];i.forEach((function(t){e({val:t,op:r},n,"numeric")||c.push(t)})),c.length!==i.length&&(t=!0),s[r]=c})),i[n]=s,i}),{});return t?i:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:l.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:l.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:l.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:l.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:l.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:l.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:l.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:l.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:l.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&l.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var i=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!i)return i;var a,s,c=o(r),u=void 0!==(a=this.numericRefinements[e][t],s=c,n(a,(function(e){return f(e,s)})));return i&&u},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(i){var n=r[i];-1===e.indexOf(i)&&void 0!==n&&(t[i]=n)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=d.validate(this,e);if(t)throw t;var r=this,i=d._parseNumbers(e),n=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(i).reduce((function(e,t){var r=void 0!==e[t],n=void 0!==i[t];return r&&!n?u(e,[t]):(n&&(e[t]=i[t]),e)}),n);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return n(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=d},10210:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var i=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[i.name]&&e.hierarchicalFacetsRefinements[i.name][0]||"",h=e._getHierarchicalFacetSeparator(i),l=e._getHierarchicalRootPath(i),f=e._getHierarchicalShowParentLevel(i),d=a(e._getHierarchicalFacetSortBy(i)),m=t.every((function(e){return e.exhaustive})),p=function(e,t,r,i,a){return function(o,h,l){var f=o;if(l>0){var d=0;for(f=o;d<l;){var m=f&&Array.isArray(f.data)?f.data:[];f=n(m,(function(e){return e.isRefined})),d++}}if(f){var p=Object.keys(h.data).map((function(e){return[e,h.data[e]]})).filter((function(e){return function(e,t,r,i,n,a){if(n&&(0!==e.indexOf(n)||n===e))return!1;return!n&&-1===e.indexOf(i)||n&&e.split(i).length-n.split(i).length==1||-1===e.indexOf(i)&&-1===r.indexOf(i)||0===r.indexOf(e)||0===e.indexOf(t+i)&&(a||0===e.indexOf(r))}(e[0],f.path||r,a,t,r,i)}));f.data=s(p.map((function(e){var r=e[0];return function(e,t,r,i,n){var a=t.split(r);return{name:a[a.length-1].trim(),path:t,escapedValue:c(t),count:e,isRefined:i===t||0===i.indexOf(t+r),exhaustive:n,data:null}}(e[1],r,t,u(a),h.exhaustive)})),e[0],e[1])}return o}}(d,h,l,f,o),v=t;return l&&(v=t.slice(l.split(h).length)),v.reduce(p,{name:e.hierarchicalFacets[r].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:m,data:null})}};var i=r(94039),n=r(7888),a=r(82293),s=r(42148),c=i.escapeFacetValue,u=i.unescapeFacetValue},23076:(e,t,r)=>{"use strict";var i=r(74587),n=r(52344),a=r(94039),s=r(7888),c=r(69725),u=r(82293),o=r(60185),h=r(42148),l=a.escapeFacetValue,f=a.unescapeFacetValue,d=r(10210);function m(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var a=t[0];this._rawResults=t;var u=this;Object.keys(a).forEach((function(e){u[e]=a[e]})),Object.keys(r||{}).forEach((function(e){u[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var h=e.getRefinedDisjunctiveFacets(),l=m(e.facets),v=m(e.disjunctiveFacets),g=1,y=a.facets||{};Object.keys(y).forEach((function(t){var r,i,n=y[t],o=(r=e.hierarchicalFacets,i=t,s(r,(function(e){return(e.attributes||[]).indexOf(i)>-1})));if(o){var h=o.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===o.name}));u.hierarchicalFacets[f][h]={attribute:t,data:n,exhaustive:a.exhaustiveFacetsCount}}else{var d,m=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);m&&(d=v[t],u.disjunctiveFacets[d]={name:t,data:n,exhaustive:a.exhaustiveFacetsCount},p(u.disjunctiveFacets[d],a.facets_stats,t)),g&&(d=l[t],u.facets[d]={name:t,data:n,exhaustive:a.exhaustiveFacetsCount},p(u.facets[d],a.facets_stats,t))}})),this.hierarchicalFacets=i(this.hierarchicalFacets),h.forEach((function(r){var i=t[g],s=i&&i.facets?i.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(s).forEach((function(t){var r,l=s[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var d=c(u.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===d)return;u.hierarchicalFacets[r][d].data=o({},u.hierarchicalFacets[r][d].data,l)}else{r=v[t];var m=a.facets&&a.facets[t]||{};u.disjunctiveFacets[r]={name:t,data:n({},l,m),exhaustive:i.exhaustiveFacetsCount},p(u.disjunctiveFacets[r],i.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(i){!u.disjunctiveFacets[r].data[i]&&e.disjunctiveFacetsRefinements[t].indexOf(f(i))>-1&&(u.disjunctiveFacets[r].data[i]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var i=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(i),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var o=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===i.name})),l=c(u.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==l){var f={};if(s.length>0){var d=s[0].split(a)[0];f[d]=u.hierarchicalFacets[h][l].data[d]}u.hierarchicalFacets[h][l].data=n(f,o,u.hierarchicalFacets[h][l].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],i=l[t];u.facets[i]={name:t,data:y[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){u.facets[i]=u.facets[i]||{name:t},u.facets[i].data=u.facets[i].data||{},u.facets[i].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(d(e)),this.facets=i(this.facets),this.disjunctiveFacets=i(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var i=s(e.facets,r);return i?Object.keys(i.data).map((function(r){var n=l(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var n=s(e.disjunctiveFacets,r);return n?Object.keys(n.data).map((function(r){var i=l(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,i)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,r);if(!a)return a;var c=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(c),o=f(e._state.getHierarchicalRefinement(t)[0]||"");0===o.indexOf(c.rootPath)&&(o=o.replace(c.rootPath+u,""));var h=o.split(u);return h.unshift(t),y(a,h,0),a}}function y(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,i){if(i=i||0,Array.isArray(t))return e(t,r[i]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,i+1)})),s=e(a,r[i]);return n({data:s},t)}function F(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function _(e,t,r,i,n){var a=s(n,(function(e){return e.name===r})),c=a&&a.data&&a.data[i]?a.data[i]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:i,count:c,exhaustive:u}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var i,a=n({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(r))i=[e];else i=s._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(a.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(r)return function(e,t){var r=[],i=[],n=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==n[t]?r[n[t]]=e:i.push(e)})),r=r.filter((function(e){return e}));var a,s=t.sortRemainingBy;return"hidden"===s?r:(a="alpha"===s?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(i,a[0],a[1])))}(e,r)}if(Array.isArray(a.sortBy)){var i=u(a.sortBy,v.DEFAULT_SORT);return h(e,i[0],i[1])}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,i)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(i){e.facetsRefinements[i].forEach((function(n){r.push(_(e,"facet",i,n,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(i){e.facetsExcludes[i].forEach((function(n){r.push(_(e,"exclude",i,n,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(i){e.disjunctiveFacetsRefinements[i].forEach((function(n){r.push(_(e,"disjunctive",i,n,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(i){e.hierarchicalFacetsRefinements[i].forEach((function(n){r.push(function(e,t,r,i){var n=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(n),c=r.split(a),u=s(i,(function(e){return e.name===t})),o=c.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,l=o&&o.exhaustive||!1,f=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:f,count:h,exhaustive:l}}(e,i,n,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var i=e.numericRefinements[t];Object.keys(i).forEach((function(e){i[e].forEach((function(i){r.push({type:"numeric",attributeName:t,name:i,numericValue:i,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},49374:(e,t,r)=>{"use strict";var i=r(17331),n=r(68078),a=r(94039).escapeFacetValue,s=r(14853),c=r(60185),u=r(90116),o=r(49803),h=r(96394),l=r(17775),f=r(23076),d=r(24336);function m(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+d+")"),this.setClient(e);var i=r||{};i.index=t,this.state=l.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function p(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}s(m,i),m.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},m.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},m.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},m.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,i=h._getQueries(r.index,r),n=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(i).then((function(e){return n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),{content:new f(r,e.results),state:r,_originalResponse:e}}),(function(e){throw n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),e}));this.client.search(i).then((function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(null,new f(r,e.results),r)})).catch((function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(e,null,r)}))},m.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var i=r.getModifiedState(t),n=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:o(h._getHitsSearchParams(i),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var s=this.client.initIndex(i.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(i.query,e.queryLanguages,n)},m.prototype.searchForFacetValues=function(e,t,r,i){var n="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!n&&!s&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(i||{}),u=c.isDisjunctiveFacet(e),o=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var l,f=this;return n?l=this.client.searchForFacetValues([{indexName:c.index,params:o}]):s?l=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,l=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),l.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=a(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},m.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},m.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},m.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},m.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},m.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},m.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},m.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},m.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},m.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},m.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},m.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},m.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},m.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},m.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},m.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},m.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},m.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},m.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},m.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},m.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},m.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},m.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},m.prototype.setCurrentPage=p,m.prototype.setPage=p,m.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},m.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},m.prototype.setState=function(e){return this._change({state:l.make(e),isPageReset:!1}),this},m.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new l(e),this},m.prototype.hasRefinements=function(e){return!!u(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},m.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},m.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},m.prototype.hasTag=function(e){return this.state.isTagRefined(e)},m.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},m.prototype.getIndex=function(){return this.state.index},m.prototype.getCurrentPage=v,m.prototype.getPage=v,m.prototype.getTags=function(){return this.state.tagRefinements},m.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var i=r[e];t.push({value:i,operator:e,type:"numeric"})})),t},m.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},m.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},m.prototype._search=function(e){var t=this.state,r=[],i=[];e.onlyWithDerivedHelpers||(i=h._getQueries(t.index,t),r.push({state:t,queriesCount:i.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var n=this.derivedHelpers.map((function(e){var i=e.getModifiedState(t),n=i.index?h._getQueries(i.index,i):[];return r.push({state:i,queriesCount:n.length,helper:e}),e.emit("search",{state:i,results:e.lastResults}),n})),a=Array.prototype.concat.apply(i,n),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(c){this.emit("error",{error:c})}},m.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty");var i=r.results.slice();e.forEach((function(e){var t=e.state,r=e.queriesCount,n=e.helper,a=i.splice(0,r);t.index?(n.lastResults=new f(t,a),n.emit("result",{results:n.lastResults,state:t})):n.emit("result",{results:null,state:t})}))}},m.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbQueries&&this.emit("searchQueueEmpty"))},m.prototype.containsRefinement=function(e,t,r,i){return e||0!==t.length||0!==r.length||0!==i.length},m.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0},m.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},m.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},m.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+d+")"),this.client=e),this},m.prototype.getClient=function(){return this.client},m.prototype.derive=function(e){var t=new n(this,e);return this.derivedHelpers.push(t),t},m.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},m.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=m},74587:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},52344:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},94039:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},7888:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]}},69725:e=>{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}},82293:(e,t,r)=>{"use strict";var i=r(7888);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var n=t.split(":"),a=i(r,(function(e){return e[0]===n[0]}));return n.length>1||!a?(e[0].push(n[0]),e[1].push(n[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},14853:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},22686:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,i){return t.indexOf(r)>-1&&e.indexOf(r)===i}))}},60185:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,i){if(e===i)return e;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&"__proto__"!==n&&"constructor"!==n){var a=i[n],s=e[n];void 0!==s&&void 0===a||(t(s)&&t(a)?e[n]=r(s,a):e[n]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var i=1,n=arguments.length;i<n;i++){var a=arguments[i];t(a)&&r(e,a)}return e}},90116:e=>{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},49803:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,i,n={},a=Object.keys(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||(n[r]=e[r]);return n}},42148:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=void 0!==t,a=null===t;if(!a&&e>t||i&&n||!r)return 1;if(!i&&e<t||a&&r||!n)return-1}return 0}e.exports=function(e,r,i){if(!Array.isArray(e))return[];Array.isArray(i)||(i=[]);var n=e.map((function(e,t){return{criteria:r.map((function(t){return e[t]})),index:t,value:e}}));return n.sort((function(e,r){for(var n=-1;++n<e.criteria.length;){var a=t(e.criteria[n],r.criteria[n]);if(a)return n>=i.length?a:"desc"===i[n]?-a:a}return e.index-r.index})),n.map((function(e){return e.value}))}},28023:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},96394:(e,t,r)=>{"use strict";var i=r(60185);function n(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(i){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,i)})})),t.getRefinedHierarchicalFacets().forEach((function(i){var n=t.getHierarchicalFacetByName(i),s=t.getHierarchicalRefinement(i),c=t._getHierarchicalFacetSeparator(n);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:n.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(i,s){var c=a._getDisjunctiveFacetSearchParams(t,i.attribute,0===s);function o(e){return n.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),l=u[s-1];c.facetFilters=s>0?h.concat(l.attribute+":"+l.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),n(i({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),n(i({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(i){var n=e.numericRefinements[i]||{};Object.keys(n).forEach((function(e){var a=n[e]||[];t!==i&&a.forEach((function(t){if(Array.isArray(t)){var n=t.map((function(t){return i+e+t}));r.push(n)}else r.push(i+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var i=[],n=e.facetsRefinements||{};Object.keys(n).sort().forEach((function(e){(n[e]||[]).sort().forEach((function(t){i.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){i.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var n=[];r.sort().forEach((function(t){n.push(e+":"+t)})),i.push(n)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(n){var a=(c[n]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(n),h=e._getHierarchicalFacetSeparator(o),l=e._getHierarchicalRootPath(o);if(t===n){if(-1===a.indexOf(h)||!l&&!0===r||l&&l.split(h).length===a.split(h).length)return;l?(u=l.split(h).length-1,a=l):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&i.push([s+":"+a])}})),i},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var i=e.getHierarchicalRefinement(r.name)[0];if(!i)return t.push(r.attributes[0]),t;var n=e._getHierarchicalFacetSeparator(r),a=i.split(n).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var i=e._getHierarchicalFacetSeparator(t);if(!0===r){var n=e._getHierarchicalRootPath(t),a=0;return n&&(a=n.split(i).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),n(i({},a._getHitsSearchParams(c),u))}};e.exports=a},46801:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},24336:e=>{"use strict";e.exports="3.14.2"},23777:(e,t,r)=>{"use strict";r.d(t,{c:()=>o});var i=r(67294),n=r(39962);const a=["zero","one","two","few","many","other"];function s(e){return a.filter((t=>e.includes(t)))}const c={locale:"en",pluralForms:s(["one","other"]),select:e=>1===e?"one":"other"};function u(){const{i18n:{currentLocale:e}}=(0,n.Z)();return(0,i.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:s(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),c}}),[e])}function o(){const e=u();return{selectMessage:(t,r)=>function(e,t,r){const i=e.split("|");if(1===i.length)return i[0];i.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${i.length}: ${e}`);const n=r.select(t),a=r.pluralForms.indexOf(n);return i[Math.min(a,i.length-1)]}(r,t,e)}}},84496:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var i=r(67294),n=r(86010),a=r(8131),s=r.n(a),c=r(31514),u=r(83699),o=r(36136),h=r(23777),l=r(61500),f=r(43768),d=r(35463),m=r(97795),p=r(39962);var v=r(89871),g=r(97325),y=r(66945);const R={searchQueryInput:"searchQueryInput_tAtn",searchVersionInput:"searchVersionInput_pEIW",searchResultsColumn:"searchResultsColumn_EPg1",algoliaLogo:"algoliaLogo_v0Zm",algoliaLogoPathFill:"algoliaLogoPathFill_Wcie",searchResultItem:"searchResultItem_tk59",searchResultItemHeading:"searchResultItemHeading_SlUl",searchResultItemPath:"searchResultItemPath_F356",searchResultItemSummary:"searchResultItemSummary_Csqe",searchQueryColumn:"searchQueryColumn_dnRM",searchVersionColumn:"searchVersionColumn_LFf5",searchLogoColumn:"searchLogoColumn_wQ1C",loadingSpinner:"loadingSpinner_NGMR","loading-spin":"loading-spin_RtPG",loader:"loader_Dnz0"};var F=r(28499);function _(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return i.createElement("div",{className:(0,n.Z)("col","col--3","padding-left--none",R.searchVersionColumn)},r.map((e=>{let[n,a]=e;const s=r.length>1?`${n}: `:"";return i.createElement("select",{key:n,onChange:e=>t.setSearchVersion(n,e.target.value),defaultValue:t.searchVersions[n],className:R.searchVersionInput},a.versions.map(((e,t)=>i.createElement("option",{key:t,label:`${s}${e.label}`,value:e.name}))))})))}function b(){const{siteConfig:{themeConfig:e},i18n:{currentLocale:t}}=(0,p.Z)(),{typesense:{typesenseCollectionName:r,typesenseServerConfig:a,typesenseSearchParameters:d,externalUrlRegex:b}}=e,E=function(){const{selectMessage:e}=(0,h.c)();return t=>e(t,(0,g.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),P=function(){const e=(0,v._r)(),[t,r]=(0,i.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,i]=t;return{...e,[r]:i.versions[0].name}}),{}))),n=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:n,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),{searchQuery:j,setSearchQuery:x}=(0,m.O)(),w={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[S,N]=(0,i.useReducer)(((e,t)=>{switch(t.type){case"reset":return w;case"loading":return{...e,loading:!0};case"update":return j!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),w),A=new F.Z({server:a,additionalSearchParameters:{query_by:"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content",include_fields:"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content,anchor,url,type,id",highlight_full_fields:"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content",group_by:"url",group_limit:3,highlight_affix_num_tokens:50,...d}}),H=s()(A.searchClient,r,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});H.on("result",(e=>{let{results:{query:t,hits:r,page:i,nbHits:n,nbPages:a}}=e;if(""===t||!Array.isArray(r))return void N({type:"reset"});const s=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:r,_snippetResult:i={}}=e;const n=new URL(t),a=[0,1,2,3,4,5,6].map((e=>{const t=r[`hierarchy.lvl${e}`];return t?s(t.value):""})).filter((e=>e));return{title:a.pop(),url:(0,l.F)(b,n.href)?n.href:n.pathname+n.hash,summary:i.content?`${s(i.content.value)}...`:"",breadcrumbs:a}}));N({type:"update",value:{items:c,query:t,totalResults:n,totalPages:a,lastPage:i,hasMore:a>i+1,loading:!1}})})),H.on("error",(function(e){console.error(e)}));const[O,C]=(0,i.useState)(null),T=(0,i.useRef)(0),k=(0,i.useRef)(o.Z.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&T.current>r&&N({type:"advance"}),T.current=r}),{threshold:1})),Q=()=>j?(0,g.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:j}):(0,g.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),I=(0,f.zX)((function(e){void 0===e&&(e=0),H.addDisjunctiveFacetRefinement("docusaurus_tag","default"),H.addDisjunctiveFacetRefinement("language",t),Object.entries(P.searchVersions).forEach((e=>{let[t,r]=e;H.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),H.setQuery(j).setPage(e).search()}));return(0,i.useEffect)((()=>{if(!O)return;const e=k.current;return e?(e.observe(O),()=>e.unobserve(O)):()=>!0}),[O]),(0,i.useEffect)((()=>{N({type:"reset"}),j&&(N({type:"loading"}),setTimeout((()=>{I()}),300))}),[j,P.searchVersions,I]),(0,i.useEffect)((()=>{S.lastPage&&0!==S.lastPage&&I(S.lastPage)}),[I,S.lastPage]),i.createElement(y.Z,null,i.createElement(c.Z,null,i.createElement("title",null,function(e){const{siteConfig:t}=(0,p.Z)(),{title:r,titleDelimiter:i}=t;return e?.trim().length?`${e.trim()} ${i} ${r}`:r}(Q())),i.createElement("meta",{property:"robots",content:"noindex, follow"})),i.createElement("div",{className:"container margin-vert--lg"},i.createElement("h1",null,Q()),i.createElement("form",{className:"row",onSubmit:e=>e.preventDefault()},i.createElement("div",{className:(0,n.Z)("col",R.searchQueryColumn,{"col--9":P.versioningEnabled,"col--12":!P.versioningEnabled})},i.createElement("input",{type:"search",name:"q",className:R.searchQueryInput,placeholder:(0,g.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,g.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>x(e.target.value),value:j,autoComplete:"off",autoFocus:!0})),P.versioningEnabled&&i.createElement(_,{docsSearchVersionsHelpers:P})),i.createElement("div",{className:"row"},i.createElement("div",{className:(0,n.Z)("col","col--8",R.searchResultsColumn)},!!S.totalResults&&E(S.totalResults)),i.createElement("div",{className:(0,n.Z)("col","col--4","text--right",R.searchLogoColumn)},i.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://typesense.org/?utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch","aria-label":(0,g.I)({id:"theme.SearchPage.typesenseLabel",message:"Search by Typesense",description:"The ARIA label for Typesense mention"})},i.createElement("svg",{fill:"none",height:"21",viewBox:"0 0 141 21",width:"141",xmlns:"http://www.w3.org/2000/svg"},i.createElement("clipPath",{id:"a"},i.createElement("path",{d:"m0 0h141v21h-141z"})),i.createElement("g",{clipPath:"url(#a)"},i.createElement("g",{fill:"#1035bc"},i.createElement("path",{d:"m62.0647 6.453c.0371.19.0557.37367.0557.551 0 .16467-.0186.342-.0557.532l-2.3561-.019v6.384c0 .532.2412.798.7235.798h1.41c.0866.2153.1299.4307.1299.646s-.0124.3483-.0371.399c-.569.076-1.1564.114-1.7625.114-1.1997 0-1.7995-.5257-1.7995-1.577v-6.764l-1.3172.019c-.0371-.19-.0557-.36733-.0557-.532 0-.17733.0186-.361.0557-.551l1.3172.019v-1.995c0-.342.0494-.58267.1484-.722.0989-.152.2906-.228.5751-.228h.5009l.1113.114v2.85z"}),i.createElement("path",{d:"m71.0419 6.548-2.5416 8.911c-.47 1.634-.9709 2.7867-1.5027 3.458s-1.3296 1.007-2.3932 1.007c-.5442 0-1.0452-.0823-1.5028-.247-.0371-.3547.0619-.6967.2969-1.026.3834.1393.7915.209 1.2244.209.6555 0 1.1564-.228 1.5027-.684s.6617-1.1653.9462-2.128l.0556-.19c-.3215-.0253-.5689-.1013-.742-.228-.1608-.1267-.2969-.361-.4082-.703l-2.5973-8.36c.3834-.16467.6555-.247.8163-.247.3587 0 .5999.22167.7235.665l1.4657 4.769c.0494.152.3339 1.14.8534 2.964.0247.0887.0865.133.1855.133l2.2633-8.398c.1608-.05067.3711-.076.6308-.076.2721 0 .5009.038.6864.114z"}),i.createElement("path",{d:"m74.6067 15.155v3.762c0 .342-.0495.5827-.1484.722-.0989.152-.2968.228-.5937.228h-.5009l-.1113-.114v-13.243l.1113-.114h.4824c.2968 0 .4947.08233.5936.247.1114.152.167.40533.167.76v.095c.7421-.84867 1.6264-1.273 2.653-1.273 1.0513 0 1.8428.437 2.3746 1.311.5319.86133.7978 2.05834.7978 3.591 0 .7473-.099 1.4187-.2968 2.014-.1856.5953-.4391 1.102-.7607 1.52-.3092.4053-.6679.722-1.076.95-.4082.2153-.8287.323-1.2616.323-.8534 0-1.6635-.2597-2.4303-.779zm0-6.175v4.883c.7545.57 1.4656.855 2.1335.855s1.2183-.304 1.6512-.912c.4328-.608.6493-1.5263.6493-2.755 0-.608-.0557-1.13366-.167-1.577-.0989-.456-.235-.82967-.4081-1.121-.1732-.304-.3773-.52567-.6123-.665-.2226-.152-.4638-.228-.7235-.228-.4947 0-.9647.133-1.41.399-.4452.266-.8163.63967-1.1131 1.121z"}),i.createElement("path",{d:"m89.8263 11.545h-5.7512c.0619 2.1533.8596 3.23 2.3932 3.23.8411 0 1.7378-.266 2.6901-.798.2721.2533.4391.5763.5009.969-1.0142.7093-2.152 1.064-3.4136 1.064-.6431 0-1.1935-.1203-1.6511-.361-.4576-.2533-.8349-.5953-1.1317-1.026-.2845-.4433-.4947-.9627-.6308-1.558-.136-.5953-.204-1.2477-.204-1.957 0-.722.0803-1.38067.2411-1.976.1732-.59533.4205-1.10833.7421-1.539s.705-.76633 1.1503-1.007c.4576-.24067.977-.361 1.5583-.361.569 0 1.0761.10767 1.5213.323.4576.20267.8349.48767 1.1317.855.3092.35467.5442.78533.705 1.292.1608.494.2411 1.026.2411 1.596 0 .228-.0123.4497-.0371.665-.0123.2027-.0309.399-.0556.589zm-5.7512-1.083h4.4525v-.247c0-.874-.1793-1.577-.538-2.109s-.8967-.798-1.614-.798c-.705 0-1.2554.285-1.6512.855-.3834.57-.5998 1.33633-.6493 2.299z"}),i.createElement("path",{d:"m91.7359 15.117c.0123-.2787.0865-.5827.2226-.912.1484-.342.3154-.608.5009-.798.9771.5447 1.8367.817 2.5787.817.4082 0 .7359-.0823.9833-.247.2597-.1647.3896-.3863.3896-.665 0-.4433-.3339-.798-1.0018-1.064l-1.0389-.399c-1.5584-.5827-2.3376-1.5137-2.3376-2.793 0-.456.0804-.86133.2412-1.216.1731-.36733.4081-.67767.705-.931.3092-.266.674-.46867 1.0945-.608s.8905-.209 1.41-.209c.235 0 .4947.019.7792.057.2968.038.5937.095.8905.171.2968.06333.5813.13933.8534.228s.5071.18367.705.285c0 .31667-.0619.646-.1856.988-.1236.342-.2906.59533-.5009.76-.977-.44333-1.8243-.665-2.5416-.665-.3216 0-.5751.08233-.7606.247-.1856.152-.2783.35467-.2783.608 0 .39267.3092.703.9276.931l1.1317.418c.8163.2913 1.4223.6903 1.8181 1.197.3957.5067.5936 1.0957.5936 1.767 0 .8993-.3277 1.6213-.9832 2.166-.6555.532-1.5955.798-2.8199.798-1.1998 0-2.3253-.3103-3.3765-.931z"}),i.createElement("path",{d:"m107.996 11.868h-5.121c.037.6967.192 1.2477.464 1.653.284.3927.773.589 1.466.589.717 0 1.539-.2153 2.467-.646.359.38.587.8803.686 1.501-.989.722-2.176 1.083-3.562 1.083-1.311 0-2.306-.4117-2.987-1.235-.667-.836-1.001-2.071-1.001-3.705 0-.76.086-1.444.259-2.052.174-.62067.427-1.14633.761-1.577.334-.44333.742-.78533 1.224-1.026.483-.24067 1.033-.361 1.652-.361.63 0 1.187.10133 1.669.304.483.19.891.46867 1.225.836.334.35467.581.779.742 1.273.173.494.26 1.03233.26 1.615 0 .3167-.019.6207-.056.912-.037.2787-.087.5573-.148.836zm-3.581-3.99c-.965 0-1.484.74733-1.558 2.242h3.079v-.228c0-.608-.123-1.09567-.371-1.463-.247-.36733-.631-.551-1.15-.551z"}),i.createElement("path",{d:"m118.163 9.436v4.142c0 .8107.13 1.4123.39 1.805-.396.3547-.872.532-1.429.532-.532 0-.897-.1203-1.095-.361-.197-.2533-.296-.646-.296-1.178v-4.427c0-.57-.068-.969-.204-1.197-.137-.228-.39-.342-.761-.342-.656 0-1.268.304-1.837.912v6.46c-.185.038-.383.0633-.593.076-.198.0127-.402.019-.613.019-.21 0-.42-.0063-.63-.019-.198-.0127-.39-.038-.576-.076v-9.405l.112-.133h.927c.693 0 1.126.38 1.299 1.14.903-.798 1.8-1.197 2.69-1.197.891 0 1.546.29767 1.967.893.433.58267.649 1.368.649 2.356z"}),i.createElement("path",{d:"m120.109 15.117c.012-.2787.087-.5827.223-.912.148-.342.315-.608.501-.798.977.5447 1.836.817 2.578.817.408 0 .736-.0823.984-.247.259-.1647.389-.3863.389-.665 0-.4433-.334-.798-1.002-1.064l-1.039-.399c-1.558-.5827-2.337-1.5137-2.337-2.793 0-.456.08-.86133.241-1.216.173-.36733.408-.67767.705-.931.309-.266.674-.46867 1.095-.608.42-.13933.89-.209 1.41-.209.235 0 .494.019.779.057.297.038.593.095.89.171.297.06333.582.13933.854.228s.507.18367.705.285c0 .31667-.062.646-.186.988s-.291.59533-.501.76c-.977-.44333-1.824-.665-2.541-.665-.322 0-.576.08233-.761.247-.186.152-.278.35467-.278.608 0 .39267.309.703.927.931l1.132.418c.816.2913 1.422.6903 1.818 1.197s.594 1.0957.594 1.767c0 .8993-.328 1.6213-.984 2.166-.655.532-1.595.798-2.819.798-1.2 0-2.326-.3103-3.377-.931z"}),i.createElement("path",{d:"m136.369 11.868h-5.121c.037.6967.192 1.2477.464 1.653.285.3927.773.589 1.466.589.717 0 1.54-.2153 2.467-.646.359.38.588.8803.687 1.501-.99.722-2.177 1.083-3.562 1.083-1.311 0-2.307-.4117-2.987-1.235-.668-.836-1.002-2.071-1.002-3.705 0-.76.086-1.444.26-2.052.173-.62067.426-1.14633.76-1.577.334-.44333.742-.78533 1.225-1.026.482-.24067 1.032-.361 1.651-.361.631 0 1.187.10133 1.67.304.482.19.89.46867 1.224.836.334.35467.581.779.742 1.273.173.494.26 1.03233.26 1.615 0 .3167-.019.6207-.056.912-.037.2787-.086.5573-.148.836zm-3.581-3.99c-.965 0-1.484.74733-1.558 2.242h3.079v-.228c0-.608-.123-1.09567-.371-1.463-.247-.36733-.63-.551-1.15-.551z"}),i.createElement("path",{d:"m139.245 18.442v-17.385c.186-.038.396-.057.631-.057.247 0 .476.019.686.057v17.385c-.21.038-.439.057-.686.057-.235 0-.445-.019-.631-.057z"})),i.createElement("path",{d:"m2.648 14.604c.216.144.556.272 1.02.384s.872.168 1.224.168c.592 0 1.104-.092 1.536-.276.44-.184.772-.436.996-.756.232-.32.348-.688.348-1.104 0-.384-.08-.712-.24-.984-.16-.28-.396-.528-.708-.744-.304-.216-.708-.44-1.212-.672-.56-.256-.984-.468-1.272-.636s-.512-.352-.672-.552c-.152-.208-.228-.456-.228-.744 0-.384.156-.684.468-.9.32-.216.744-.324 1.272-.324.352 0 .648.036.888.108.248.072.52.176.816.312l.324-.732c-.28-.144-.604-.264-.972-.36-.36-.096-.732-.144-1.116-.144-.52 0-.98.092-1.38.276-.392.176-.696.42-.912.732-.208.312-.312.66-.312 1.044 0 .544.172 1.004.516 1.38.352.376.9.724 1.644 1.044.52.224.928.424 1.224.6.304.168.536.36.696.576.16.208.24.452.24.732 0 .392-.172.712-.516.96-.336.24-.816.36-1.44.36-.352 0-.712-.048-1.08-.144-.36-.104-.668-.22-.924-.348zm11.0963-2.364c0-.96-.204-1.736-.612-2.328-.4-.592-1.024-.888-1.872-.888-.56 0-1.048.132-1.46396.396-.408.256-.72.616-.936 1.08-.208.456-.312.98-.312 1.572 0 .936.26 1.684.78 2.244s1.27596.84 2.26796.84c.4 0 .764-.052 1.092-.156.328-.112.656-.26.984-.444l-.3-.696c-.36.176-.672.304-.936.384-.256.08-.54.12-.852.12-.688 0-1.2-.188-1.536-.564-.32796-.384-.50396-.904-.52796-1.56zm-4.19996-.648c.056-.544.224-.972.50396-1.284.288-.32.68-.48 1.176-.48.92 0 1.448.588 1.584 1.764zm5.84426-1.344c.288-.128.552-.224.792-.288.248-.072.544-.108.888-.108.44 0 .76.124.96.372.208.248.312.588.312 1.02v.324h-1.5c-.632 0-1.14.156-1.524.468s-.576.748-.576 1.308c0 .536.168.972.504 1.308.344.336.84.504 1.488.504.304 0 .616-.072.936-.216.32-.152.588-.328.804-.528l.12.588h.708v-4.02c0-.376-.096-.712-.288-1.008s-.46-.528-.804-.696-.736-.252-1.176-.252c-.264 0-.6.048-1.008.144-.4.096-.704.216-.912.36zm.228 3.096c0-.32.104-.588.312-.804.216-.224.512-.336.888-.336h1.536v1.32c-.216.256-.468.464-.756.624-.28.16-.576.24-.888.24-.36 0-.632-.104-.816-.312s-.276-.452-.276-.732zm6.0874-2.352c.272-.28.604-.524.996-.732.392-.216.748-.324 1.068-.324l-.228-.756c-.28 0-.604.1-.972.3s-.684.412-.948.636l-.3-.936h-.564v5.82h.948zm6.9986 2.952c-.28.144-.532.248-.756.312s-.512.096-.864.096c-.584 0-1.036-.212-1.356-.636s-.48-.976-.48-1.656c.008-.648.18-1.18.516-1.596.336-.424.792-.636 1.368-.636.336 0 .608.032.816.096.216.064.484.164.804.3l.288-.672c-.232-.152-.54-.276-.924-.372-.376-.104-.696-.156-.96-.156-.576 0-1.08.132-1.512.396-.432.256-.768.616-1.008 1.08-.232.456-.348.98-.348 1.572 0 .6.112 1.136.336 1.608.224.464.548.828.972 1.092.424.256.924.384 1.5.384.264 0 .588-.052.972-.156.384-.096.696-.22.936-.372zm4.6201-4.944c.616 0 1.072.188 1.368.564.304.368.456.864.456 1.488v3.936h-.948v-3.804c0-.432-.08-.768-.24-1.008s-.428-.36-.804-.36c-.288 0-.616.1-.984.3-.36.2-.68.452-.96.756v4.128h-.948v-8.352l.948-.12v3.396c.28-.272.612-.492.996-.66.392-.176.764-.264 1.116-.264zm8.5136.024c.864 0 1.54.284 2.028.852.496.56.744 1.304.744 2.232 0 .592-.116 1.12-.348 1.584-.224.456-.548.816-.972 1.08-.416.256-.908.384-1.476.384-.24 0-.496-.052-.768-.156-.264-.096-.512-.236-.744-.42l-.204.42h-.564v-8.352l.948-.12v2.94c.216-.144.444-.252.684-.324.24-.08.464-.12.672-.12zm0 5.328c.576 0 1.02-.208 1.332-.624s.472-.952.48-1.608c0-.688-.156-1.24-.468-1.656-.304-.424-.748-.636-1.332-.636-.288 0-.54.044-.756.132s-.42.224-.612.408v3.468c.192.168.396.296.612.384s.464.132.744.132zm5.0915 1.608c-.088.24-.224.42-.408.54-.176.128-.452.28-.828.456l.288.684c.424-.088.796-.26 1.116-.516.328-.256.56-.564.696-.924l2.568-7.02h-.96l-1.668 4.5-1.764-4.68-.84.36 2.16 5.604z",fill:"#000",fillOpacity:".25"})))))),S.items.length>0?i.createElement("main",null,S.items.map(((e,t)=>{let{title:r,url:a,summary:s,breadcrumbs:c}=e;return i.createElement("article",{key:t,className:R.searchResultItem},i.createElement("h2",{className:R.searchResultItemHeading},i.createElement(u.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&i.createElement("nav",{"aria-label":"breadcrumbs"},i.createElement("ul",{className:(0,n.Z)("breadcrumbs",R.searchResultItemPath)},c.map(((e,t)=>i.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}}))))),s&&i.createElement("p",{className:R.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[j&&!S.loading&&i.createElement("p",{key:"no-results"},i.createElement(g.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!S.loading&&i.createElement("div",{key:"spinner",className:R.loadingSpinner})],S.hasMore&&i.createElement("div",{className:R.loader,ref:C},i.createElement(g.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function E(){return i.createElement(d.FG,{className:"search-page-wrapper"},i.createElement(b,null))}},17325:(e,t,r)=>{"use strict";var i=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;var n=i(r(56690)),a=i(r(89728)),s=function(){function e(){var t,r,i,a,s,c,u,o,h,l,f,d,m,p,v=this,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.default)(this,e),this.server=g.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!==(r=g.additionalSearchParameters)&&void 0!==r?r:{},this.additionalSearchParameters.query_by=null!==(i=null!==(a=this.additionalSearchParameters.queryBy)&&void 0!==a?a:this.additionalSearchParameters.query_by)&&void 0!==i?i:"",this.additionalSearchParameters.preset=null!==(s=null!==(c=this.additionalSearchParameters.preset)&&void 0!==c?c:this.additionalSearchParameters.preset)&&void 0!==s?s:"",this.additionalSearchParameters.sort_by=null!==(u=null!==(o=this.additionalSearchParameters.sortBy)&&void 0!==o?o:this.additionalSearchParameters.sort_by)&&void 0!==u?u:"",this.additionalSearchParameters.highlight_full_fields=null!==(h=null!==(l=this.additionalSearchParameters.highlightFullFields)&&void 0!==l?l:this.additionalSearchParameters.highlight_full_fields)&&void 0!==h?h:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(f=g.geoLocationField)&&void 0!==f?f:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(d=g.facetableFieldsWithSpecialCharacters)&&void 0!==d?d:[],this.collectionSpecificSearchParameters=null!==(m=g.collectionSpecificSearchParameters)&&void 0!==m?m:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(e){var t,r,i,n,a,s,c=v.collectionSpecificSearchParameters[e];c.query_by=null!==(t=c.queryBy)&&void 0!==t?t:c.query_by,c.preset=null!==(r=c.preset)&&void 0!==r?r:c.preset,c.sort_by=null!==(i=c.sortBy)&&void 0!==i?i:c.sort_by,c.highlight_full_fields=null!==(n=null!==(a=null!==(s=c.highlightFullFields)&&void 0!==s?s:c.highlight_full_fields)&&void 0!==a?a:v.additionalSearchParameters.highlight_full_fields)&&void 0!==n?n:c.query_by,Object.keys(c).forEach((function(e){return void 0===c[e]?delete c[e]:{}}))})),this.renderingContent=g.renderingContent,this.flattenGroupedHits=null===(p=g.flattenGroupedHits)||void 0===p||p}return(0,a.default)(e,[{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.")}}]),e}();t.Configuration=s},53599:(e,t,r)=>{"use strict";var i=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.FacetSearchResponseAdapter=void 0;var n=i(r(56690)),a=i(r(89728)),s=r(38399),c=function(){function e(t,r){(0,n.default)(this,e),this.typesenseResponse=t,this.instantsearchRequest=r}return(0,a.default)(e,[{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}}}]),e}();t.FacetSearchResponseAdapter=c,Object.assign(c.prototype,s.utils)},44002:(e,t,r)=>{"use strict";var i=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.SearchRequestAdapter=void 0;var n=i(r(64687)),a=i(r(17156)),s=i(r(27424)),c=i(r(56690)),u=i(r(89728)),o=function(){function e(t,r,i){(0,c.default)(this,e),this.instantsearchRequests=t,this.typesenseClient=r,this.configuration=i,this.additionalSearchParameters=i.additionalSearchParameters,this.collectionSpecificSearchParameters=i.collectionSpecificSearchParameters}var t;return(0,u.default)(e,[{key:"_adaptFacetFilters",value:function(e){var t=this,r="";return e?r=e.map((function(e){if(Array.isArray(e)){var r={};e.forEach((function(e){var i=t._parseFacetFilter(e),n=i.fieldName,a=i.fieldValue;r[n]=r[n]||[],r[n].push(a)})),Object.keys(r).length>1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(r).join(",")));var i=Object.keys(r)[0],n=r[i].reduce((function(e,r){return r.startsWith("-")&&!t._isNumber(r)?e[0].push(r.substring(1)):e[1].push(r),e}),[[],[]]),a=(0,s.default)(n,2),c=a[0],u=a[1],o=[];return u.length>0&&o.push("".concat(i,":=[").concat(u.map((function(e){return t._escapeFacetValue(e)})).join(","),"]")),c.length>0&&o.push("".concat(i,":!=[").concat(c.map((function(e){return t._escapeFacetValue(e)})).join(","),"]")),o.filter((function(e){return e})).join(" && ")}var h=t._parseFacetFilter(e),l=h.fieldName,f=h.fieldValue;return f.startsWith("-")&&!t._isNumber(f)?"".concat(l,":!=[").concat(t._escapeFacetValue(f.substring(1)),"]"):"".concat(l,":=[").concat(t._escapeFacetValue(f),"]")})).join(" && "):r}},{key:"_parseFacetFilter",value:function(e){var t,r,i,n,a;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var s=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(r=new RegExp("^(".concat(s.join("|"),"):(.*)$")),null!=(i=e.match(r)))return{fieldName:n="".concat(i[1]),fieldValue:a="".concat(i[2])}}return r=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(i=e.match(r))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(e,"` with the Regex `").concat(r,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(n="".concat(i[1]).concat(i[2]),a="".concat(i[3])),{fieldName:n,fieldValue:a}}},{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,r="";if(!e)return r;var i={};e.forEach((function(e){var r=t._parseNumericFilter(e),n=r.fieldName,a=r.operator,s=r.fieldValue;i[n]=i[n]||{},i[n][a]=s}));var n=[];return Object.keys(i).forEach((function(e){null!=i[e]["<="]&&null!=i[e][">="]?n.push("".concat(e,":=[").concat(i[e][">="],"..").concat(i[e]["<="],"]")):null!=i[e]["<="]?n.push("".concat(e,":<=").concat(i[e]["<="])):null!=i[e][">="]?n.push("".concat(e,":>=").concat(i[e][">="])):null!=i[e]["="]?n.push("".concat(e,":=").concat(i[e]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(i[e])))})),r=n.join(" && ")}},{key:"_parseNumericFilter",value:function(e){var t,r,i,n,a,c;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var u=this.configuration.facetableFieldsWithSpecialCharacters.map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(r=new RegExp("^(".concat(u.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(i=e.match(r))){var o=i,h=(0,s.default)(o,4);return{fieldName:n=h[1],operator:a=h[2],fieldValue:c=h[3]}}}if(r=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(i=e.match(r)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(e,"` with the Regex `").concat(r,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var l=i,f=(0,s.default)(l,4);n=f[1],a=f[2],c=f[3]}return{fieldName:n,operator:a,fieldValue:c}}},{key:"_adaptGeoFilter",value:function(e){var t=e.insideBoundingBox,r=e.aroundRadius,i=e.aroundLatLng,n=e.insidePolygon;if(t){var a,c,u,o;if(Array.isArray(t)){var h=t.flat(),l=(0,s.default)(h,4);a=l[0],c=l[1],u=l[2],o=l[3]}else{var f=t.split(","),d=(0,s.default)(f,4);a=d[0],c=d[1],u=d[2],o=d[3]}return"".concat(this.configuration.geoLocationField,":(").concat(a,", ").concat(c,", ").concat(a,", ").concat(o,", ").concat(u,", ").concat(o,", ").concat(u,", ").concat(c,")")}if(i||r){if(!r||"all"===r)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 m="".concat(parseFloat(r)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(i,", ").concat(m,")")}if(n){var p=n;return Array.isArray(n)&&(p=n.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(p,")")}}},{key:"_adaptFilters",value:function(e){var t=[];return e.filters&&t.push(e.filters),t.push(this._adaptFacetFilters(e.facetFilters)),t.push(this._adaptNumericFilters(e.numericFilters)),t.push(this._adaptGeoFilter(e)),t.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:"_buildSearchParameters",value:function(e){for(var t=e.params,r=e.indexName,i=this._adaptIndexName(r),n={},a=0,c=Object.entries(this.additionalSearchParameters);a<c.length;a++){var u=(0,s.default)(c[a],2),o=u[0],h=u[1];n[this._camelToSnakeCase(o)]=h}if(this.collectionSpecificSearchParameters[i])for(var l=0,f=Object.entries(this.collectionSpecificSearchParameters[i]);l<f.length;l++){var d=(0,s.default)(f[l],2),m=d[0],p=d[1];n[this._camelToSnakeCase(m)]=p}var v=Object.assign({},n),g=this._adaptSortBy(r);return Object.assign(v,{collection:i,q:""===t.query||void 0===t.query?"*":t.query,facet_by:[t.facets].flat().join(","),filter_by:this._adaptFilters(t)||n.filter_by,sort_by:g||n.sort_by,max_facet_values:t.maxValuesPerFacet,page:(t.page||0)+1}),t.hitsPerPage&&(v.per_page=t.hitsPerPage),t.facetQuery&&(v.facet_query="".concat(t.facetName,":").concat(t.facetQuery),v.per_page=0),t.typesenseVectorQuery&&(v.vector_query=t.typesenseVectorQuery,v.q="*"),Object.fromEntries(Object.entries(v).filter((function(e){var t=(0,s.default)(e,2),r=(t[0],t[1]);return null!=r&&""!==r})))}},{key:"_camelToSnakeCase",value:function(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}},{key:"request",value:(t=(0,a.default)(n.default.mark((function e(){var t,r=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.instantsearchRequests.map((function(e){return r._buildSearchParameters(e)})),e.abrupt("return",this.typesenseClient.multiSearch.perform({searches:t}));case 2:case"end":return e.stop()}}),e,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("(.*?)(<=|>=|>|<|=)(.*)")}}]),e}();t.SearchRequestAdapter=o},28499:(e,t,r)=>{"use strict";var i=r(64836);t.Z=void 0;var n=i(r(64687)),a=i(r(17156)),s=i(r(56690)),c=i(r(89728)),u=r(17325),o=r(18871),h=r(44002),l=r(42559),f=r(53599),d=function(){function e(t){var r=this;(0,s.default)(this,e),this.updateConfiguration(t),this.searchClient={clearCache:function(){return r.clearCache()},search:function(e){return r.searchTypesenseAndAdapt(e)},searchForFacetValues:function(e){return r.searchTypesenseForFacetValuesAndAdapt(e)}}}var t,r,i;return(0,c.default)(e,[{key:"searchTypesenseAndAdapt",value:(i=(0,a.default)(n.default.mark((function e(t){var r,i,a=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return r=e.sent,i=r.results.map((function(e,i){return a._validateTypesenseResult(e),new l.SearchResponseAdapter(e,t[i],a.configuration,r.results).adapt()})),e.abrupt("return",{results:i});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 i.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(r=(0,a.default)(n.default.mark((function e(t){var r,i,a=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return r=e.sent,i=r.results.map((function(e,r){return a._validateTypesenseResult(e),new f.FacetSearchResponseAdapter(e,t[r],a.configuration).adapt()})),e.abrupt("return",i);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:"_adaptAndPerformTypesenseRequest",value:(t=(0,a.default)(n.default.mark((function e(t){var r,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new h.SearchRequestAdapter(t,this.typesenseClient,this.configuration),e.next=3,r.request();case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new o.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(e){return this.configuration=new u.Configuration(e),this.configuration.validate(),this.typesenseClient=new o.SearchClient(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))}}]),e}();t.Z=d},17156:e=>{function t(e,t,r,i,n,a,s){try{var c=e[a](s),u=c.value}catch(o){return void r(o)}c.done?t(u):Promise.resolve(u).then(i,n)}e.exports=function(e){return function(){var r=this,i=arguments;return new Promise((function(n,a){var s=e.apply(r,i);function c(e){t(s,n,a,c,u,"next",e)}function u(e){t(s,n,a,c,u,"throw",e)}c(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports}}]); |