!function(){vare,t,r,i,n,s,o,a,u,l,c,d,h,f,p,y,m,g,x,v,w,Q,k,S,E,L,b,P,T=function(e){vart=newT.Builder;returnt.pipeline.add(T.trimmer,T.stopWordFilter,T.stemmer),t.searchPipeline.add(T.stemmer),e.call(t,t),t.build()};T.version="2.3.3",T.utils={},T.utils.warn=(e=this,function(t){e.console&&console.warn&&console.warn(t)}),T.utils.asString=function(e){returnvoid0===e||null===e?"":e.toString()},T.utils.clone=function(e){if(null===e||void0===e)returne;for(vart=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){varn=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!=typeofs&&"number"!=typeofs&&"boolean"!=typeofs)thrownewTypeError("clone is not deep and does not support nested objects");t[n]=s}}returnt},T.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},T.FieldRef.joiner="/",T.FieldRef.fromString=function(e){vart=e.indexOf(T.FieldRef.joiner);if(-1===t)throw"malformed field ref string";varr=e.slice(0,t),i=e.slice(t+1);returnnewT.FieldRef(i,r,e)},T.FieldRef.prototype.toString=function(){returnvoid0==this._stringValue&&(this._stringValue=this.fieldName+T.FieldRef.joiner+this.docRef),this._stringValue},T.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(vart=0;t<this.length;t++)this.elements[e[t]]=!0}elsethis.length=0},T.Set.complete={intersect:function(e){returne},union:function(e){returne},contains:function(){return!0}},T.Set.empty={intersect:function(){returnthis},union:function(e){returne},contains:function(){return!1}},T.Set.prototype.contains=function(e){return!!this.elements[e]},T.Set.prototype.intersect=function(e){vart,r,i,n=[];if(e===T.Set.complete)returnthis;if(e===T.Set.empty)returne;this.length<e.length?(t=this,r=e):(t=e,r=this),i=Object.keys(t.elements);for(vars=0;s<i.length;s++){varo=i[s];oinr.elements&&n.push(o)}returnnewT.Set(n)},T.Set.prototype.union=function(e){returne===T.Set.complete?T.Set.complete:e===T.Set.empty?this:newT.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},T.idf=function(e,t){varr=0;for(variine)"_index"!=i&&(r+=Object.keys(e[i]).length);varn=(t-r+.5)/(r+.5);returnMath.log(1+Math.abs(n))},T.Token=function(e,t){this.str=e||"",this.metadata=t||{}},T.Token.prototype.toString=function(){returnthis.str},T.Token.prototype.update=function(e){returnthis.str=e(this.str,this.metadata),this},T.Token.prototype.clone=function(e){returne=e||function(e){returne},newT.Token(e(this.str,this.metadata),this.metadata)},T.tokenizer=function(e,t){if(null==e||void0==e)return[];if(Array.isArray(e))returne.map(function(e){returnnewT.Token(T.utils.asString(e).toLowerCase(),T.utils.clone(t))});for(varr=e.toString().trim().toLowerCase(),i=r.length,n=[],s=0,o=0;s<=i;s++){vara=s-o;if(r.charAt(s).match(T.tokenizer.separator)||s==i){if(a>0){varu=T.utils.clone(t)||{};u.position=[o,a],u.index=n.length,n.push(newT.Token(r.slice(o,s),u))}o=s+1}}returnn},T.tokenizer.separator=/[\s\-]+/,T.Pipeline=function(){this._stack=[]},T.Pipeline.registeredFunctions=Object.create(null),T.Pipeline.registerFunction=function(e,t){tinthis.registeredFunctions&&T.utils.warn("Overwriting existing registered function: "+t),e.label=t,T.Pipeline.registeredFunctions[e.label]=e},T.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.labelinthis.registeredFunctions||T.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},T.Pipeline.load=function(e){vart=newT.Pipeline;returne.forEach(function(e){varr=T.Pipeline.registeredFunctions[e];if(!r)thrownewError("Cannot load unregistered function: "+e);t.add(r)}),t},T.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){T.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},T.Pipeline.prototype.after=function(e,t){T.Pipeline.warnIfFunctionNotRegistered(t);varr=this._stack.indexOf(e);if(-1==r)thrownewError("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},T.Pipeline.prototype.before=function(e,t){T.Pipeline.warnIfFunctionNotRegi