/*! no static exports found */function(e,t){e.exports=function(){for(vare=arguments.length>0&&void0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void0!==arguments[1]?arguments[1]:1,n=[],i=-1,r=-1,o=0,s=e.length;o<s;o+=1){vara=e[o];a&&-1===i?i=o:a||-1===i||((r=o-1)-i+1>=t&&n.push([i,r]),i=-1)}returne[o-1]&&o-i>=t&&n.push([i,o-1]),n}},"./src/bitap/bitap_pattern_alphabet.js":
/*! no static exports found */function(e,t){e.exports=function(e){for(vart={},n=e.length,i=0;i<n;i+=1)t[e.charAt(i)]=0;for(varr=0;r<n;r+=1)t[e.charAt(r)]|=1<<n-r-1;returnt}},"./src/bitap/bitap_regex_search.js":
/*! no static exports found */function(e,t){varn=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e.exports=function(e,t){vari=arguments.length>2&&void0!==arguments[2]?arguments[2]:/ +/g,r=newRegExp(t.replace(n,"\\$&").replace(i,"|")),o=e.match(r),s=!!o,a=[];if(s)for(varc=0,l=o.length;c<l;c+=1){varu=o[c];a.push([e.indexOf(u),u.length-1])}return{score:s?.5:1,isMatch:s,matchedIndices:a}}},"./src/bitap/bitap_score.js":
/*! no static exports found */function(e,t){e.exports=function(e,t){varn=t.errors,i=void0===n?0:n,r=t.currentLocation,o=void0===r?0:r,s=t.expectedLocation,a=void0===s?0:s,c=t.distance,l=void0===c?100:c,u=i/e.length,h=Math.abs(a-o);returnl?u+h/l:h?1:u}},"./src/bitap/bitap_search.js":
/*! no static exports found */function(e,t,n){vari=n(/*! ./bitap_score */"./src/bitap/bitap_score.js"),r=n(/*! ./bitap_matched_indices */"./src/bitap/bitap_matched_indices.js");e.exports=function(e,t,n,o){for(vars=o.location,a=void0===s?0:s,c=o.distance,l=void0===c?100:c,u=o.threshold,h=void0===u?.6:u,d=o.findAllMatches,f=void0!==d&&d,p=o.minMatchCharLength,v=void0===p?1:p,m=a,g=e.length,y=h,_=e.indexOf(t,m),b=t.length,E=[],S=0;S<g;S+=1)E[S]=0;if(-1!==_){varI=i(t,{errors:0,currentLocation:_,expectedLocation:m,distance:l});if(y=Math.min(I,y),-1!==(_=e.lastIndexOf(t,m+b))){varO=i(t,{errors:0,currentLocation:_,expectedLocation:m,distance:l});y=Math.min(O,y)}}_=-1;for(varC=[],T=1,w=b+g,k=1<<b-1,A=0;A<b;A+=1){for(varL=0,x=w;L<x;){i(t,{errors:A,currentLocation:m+x,expectedLocation:m,distance:l})<=y?L=x:w=x,x=Math.floor((w-L)/2+L)}w=x;varP=Math.max(1,m-x+1),D=f?g:Math.min(m+x,g)+b,j=Array(D+2);j[D+1]=(1<<A)-1;for(varM=D;M>=P;M-=1){varN=M-1,F=n[e.charAt(N)];if(F&&(E[N]=1),j[M]=(j[M+1]<<1|1)&F,0!==A&&(j[M]|=(C[M+1]|C[M])<<1|1|C[M+1]),j[M]&k&&(T=i(t,{errors:A,currentLocation:N,expectedLocation:m,distance:l}))<=y){if(y=T,(_=N)<=m)break;P=Math.max(1,2*m-_)}}if(i(t,{errors:A+1,currentLocation:m,expectedLocation:m,distance:l})>y)break;C=j}return{isMatch:_>=0,score:0===T?.001:T,matchedIndices:r(E,v)}}},"./src/bitap/index.js":
/*! no static exports found */function(e,t,n){functioni(e,t){for(varn=0;n<t.length;n++){vari=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}varr=n(/*! ./bitap_regex_search */"./src/bitap/bitap_regex_search.js"),o=n(/*! ./bitap_search */"./src/bitap/bitap_search.js"),s=n(/*! ./bitap_pattern_alphabet */"./src/bitap/bitap_pattern_alphabet.js"),a=function(){functione(t,n){vari=n.location,r=void0===i?0:i,o=n.distance,a=void0===o?100:o,c=n.threshold,l=void0===c?.6:c,u=n.maxPatternLength,h=void0===u?32:u,d=n.isCaseSensitive,f=void0!==d&&d,p=n.tokenSeparator,v=void0===p?/ +/g:p,m=n.findAllMatches,g=void0!==m&&m,y=n.minMatchCharLength,_=void0===y?1:y;!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,e),this.options={location:r,distance:a,threshold:l,maxPatternLength:h,isCaseSensitive:f,tokenSeparator:v,findAllMatches:g,minMatchCharLength:_},this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.pattern.length<=h&&(this.patternAlphabet=s(this.pattern))}vart,n,a;returnt=e,(n=[{key:"search",value:function(e){if(this.options.isCaseSensitive||(e=e.toLowerCase()),this.pattern===e)return{isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};vart=this.options,n=t.maxPatternLength,i=t.tokenSeparator;if(this.pattern.length>n)returnr(e,this.pattern,i);vars=this.options,a=s.location,c=s.distance,l=s.threshold,u=s.findAllMatches,h=s.minMatchCharLength;returno(e,this.pattern,this.patternAlphabet,{location:a,distance:c,threshold:l,findAllMatches:u,minMatchCharLength:h})}}])&&i(t.prototype,n),a&&i(t,a),e}();e.exports=a},"./src/helpers/deep_value.js":
/*! no static exports found */function(e,t,n){vari=n(/*! ./is_array */"./src/helpers/is_array.js");e.exports=function(e,t){returnfunctione(t,n,r){if(n){varo=n.indexOf("."),s=n,a=null;-1!==o&&(s=n.slice(0,o),a=n.slice(o+1));varc=t[s];if(null!=c)if(a||"string"!=typeofc&&"number"!=typeofc)if(i(c))for(varl=0,u=c.length;l<u;l+=1)e(c[l],a,r);elsea&&e(c,a,r);elser.push(c.toString())}elser.push(t);returnr}(e,t,[])}},"./src/helpers/is_array.js":
/*! no static exports found */function(e,t){e.exports=function(e){returnArray.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}},"./src/index.js":
/*! no static exports found */function(e,t,n){functioni(e){return(i="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(e)}functionr(e,t){for(varn=0;n<t.length;n++){vari=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}varo=n(/*! ./bitap */"./src/bitap/index.js"),s=n(/*! ./helpers/deep_value */"./src/helpers/deep_value.js"),a=n(/*! ./helpers/is_array */"./src/helpers/is_array.js"),c=function(){functione(t,n){vari=n.location,r=void0===i?0:i,o=n.distance,a=void0===o?100:o,c=n.threshold,l=void0===c?.6:c,u=n.maxPatternLength,h=void0===u?32:u,d=n.caseSensitive,f=void0!==d&&d,p=n.tokenSeparator,v=void0===p?/ +/g:p,m=n.findAllMatches,g=void0!==m&&m,y=n.minMatchCharLength,_=void0===y?1:y,b=n.id,E=void0===b?null:b,S=n.keys,I=void0===S?[]:S,O=n.shouldSort,C=void0===O||O,T=n.getFn,w=void0===T?s:T,k=n.sortFn,A=void0===k?function(e,t){returne.score-t.score}:k,L=n.tokenize,x=void0!==L&&L,P=n.matchAllTokens,D=void0!==P&&P,j=n.includeMatches,M=void0!==j&&j,N=n.includeScore,F=void0!==N&&N,K=n.verbose,R=void0!==K&&K;!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,e),this.options={location:r,distance:a,threshold:l,maxPatternLength:h,isCaseSensitive:f,tokenSeparator:v,findAllMatches:g,minMatchCharLength:_,id:E,keys:I,includeMatches:M,includeScore:F,shouldSort:C,getFn:w,sortFn:A,verbose:R,tokenize:x,matchAllTokens:D},this.setCollection(t)}vart,n,c;returnt=e,(n=[{key:"setCollection",value:function(e){returnthis.list=e,e}},{key:"search",value:function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\nSearch pattern: "'.concat(e,'"'));varn=this._prepareSearchers(e),i=n.tokenSearchers,r=n.fullSearcher,o=this._search(i,r),s=o.weights,a=o.results;returnthis._computeScore(s,a),this.options.shouldSort&&this._sort(a),t.limit&&"number"==typeoft.limit&&(a=a.slice(0,t.limit)),this._format(a)}},{key:"_prepareSearchers",value:function(){vare=arguments.length>0&&void0!==arguments[0]?arguments[0]:"",t=[];if(this.options.tokenize)for(varn=e.split(this.options.tokenSeparator),i=0,r=n.length;i<r;i+=1)t.push(newo(n[i],this.options));return{tokenSearchers:t,fullSearcher:newo(e,this.options)}}},{key:"_search",value:function(){vare=arguments.length>0&&void0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void0,n=this.list,i={},r=[];if("string"==typeofn[0]){for(varo=0,s=n.length;o<s;o+=1)this._analyze({key:"",value:n[o],record:o,index:o},{resultMap:i,results:r,tokenSearchers:e,fullSearcher:t});return{weights:null,results:r}}for(vara={},c=0,l=n.length;c<l;c+=1)for(varu=n[c],h=0,d=this.options.keys.length;h<d;h+=1){varf=this.options.keys[h];if("string"!=typeoff){if(a[f.name]={weight:1-f.weight||1},f.weight<=0||f.weight>1)thrownewError("Key weight has to be > 0 and <= 1");f=f.name}elsea[f]={weight:1};this._analyze({key:f,value:this.options.getFn(u,f),record:u,index:c},{resultMap:i,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){varn=e.key,i=e.arrayIndex,r=void0===i?-1:i,o=e.value,s=e.record,c=e.index,l=t.tokenSearchers,u=void0===l?[]:l,h=t.fullSearcher,d=void0===h?[]:h,f=t.resultMap,p=void0===f?{}:f,v=t.results,m=void0===v?[]:v;if(null!=o){varg=!1,y=-1,_=0;if("string"==typeofo){this._log("\nKey: ".concat(""===n?"-":n));varb=d.search(o);if(this._log('Full text: "'.concat(o,'", score: ').concat(b.score)),this.options.tokenize){for(varE=o.split(this.options.tokenSeparator),S=[],I=0;I<u.length;I+=1){varO=u[I];this._log('\nPattern: "'.concat(O.pattern,'"'));for(varC=!1,T=0;T<E.length;T+=1){varw=E[T],k=O.search(w),A={};k.isMatch?(A[w]=k.score,g=!0,C=!0,S.push(k.score)):(A[w]=1,this.options.matchAllTokens||S.push(1)),this._log('Token: "'.concat(w,'", score: ').concat(A[w]))}C&&(_+=1)}y=S[0];for(varL=S.length,x=1;x<L;x+=1)y+=