construct-hub-webapp 0.1.248 → 0.1.252
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +41 -39
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/service-worker.js.map +1 -1
- package/build/static/js/{0.3c441159.chunk.js → 0.eac96593.chunk.js} +2 -2
- package/build/static/js/{0.3c441159.chunk.js.map → 0.eac96593.chunk.js.map} +1 -1
- package/build/static/js/1.f1cf5c72.chunk.js +2 -0
- package/build/static/js/1.f1cf5c72.chunk.js.map +1 -0
- package/build/static/js/10.67470f34.chunk.js +2 -0
- package/build/static/js/10.67470f34.chunk.js.map +1 -0
- package/build/static/js/{11.3e7ab347.chunk.js → 11.7a407d94.chunk.js} +3 -3
- package/build/static/js/{11.3e7ab347.chunk.js.LICENSE.txt → 11.7a407d94.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/{11.3e7ab347.chunk.js.map → 11.7a407d94.chunk.js.map} +1 -1
- package/build/static/js/12.6ec7141c.chunk.js +2 -0
- package/build/static/js/12.6ec7141c.chunk.js.map +1 -0
- package/build/static/js/{12.180c2643.chunk.js → 13.6a8b9e20.chunk.js} +2 -2
- package/build/static/js/{12.180c2643.chunk.js.map → 13.6a8b9e20.chunk.js.map} +1 -1
- package/build/static/js/{13.51138a32.chunk.js → 14.024c1a38.chunk.js} +2 -2
- package/build/static/js/{13.51138a32.chunk.js.map → 14.024c1a38.chunk.js.map} +1 -1
- package/build/static/js/{14.04d06b74.chunk.js → 15.ed72dbe0.chunk.js} +3 -3
- package/build/static/js/{14.04d06b74.chunk.js.LICENSE.txt → 15.ed72dbe0.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/{14.04d06b74.chunk.js.map → 15.ed72dbe0.chunk.js.map} +1 -1
- package/build/static/js/{15.a6d03254.chunk.js → 16.5f5aad89.chunk.js} +2 -2
- package/build/static/js/{15.a6d03254.chunk.js.map → 16.5f5aad89.chunk.js.map} +1 -1
- package/build/static/js/{3.c48117e3.chunk.js → 4.33ed4462.chunk.js} +3 -3
- package/build/static/js/{3.c48117e3.chunk.js.LICENSE.txt → 4.33ed4462.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/{3.c48117e3.chunk.js.map → 4.33ed4462.chunk.js.map} +1 -1
- package/build/static/js/{4.07f80d65.chunk.js → 5.31f776a0.chunk.js} +3 -3
- package/build/static/js/{4.07f80d65.chunk.js.LICENSE.txt → 5.31f776a0.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/5.31f776a0.chunk.js.map +1 -0
- package/build/static/js/6.cb540adf.chunk.js +2 -0
- package/build/static/js/6.cb540adf.chunk.js.map +1 -0
- package/build/static/js/{8.0c7361ec.chunk.js → 7.415d3d06.chunk.js} +2 -2
- package/build/static/js/{8.0c7361ec.chunk.js.map → 7.415d3d06.chunk.js.map} +1 -1
- package/build/static/js/{9.6620eb5b.chunk.js → 8.24ecd2ff.chunk.js} +2 -2
- package/build/static/js/{9.6620eb5b.chunk.js.map → 8.24ecd2ff.chunk.js.map} +1 -1
- package/build/static/js/9.214e3382.chunk.js +2 -0
- package/build/static/js/9.214e3382.chunk.js.map +1 -0
- package/build/static/js/main.e071d0b6.chunk.js +2 -0
- package/build/static/js/{main.809e79d6.chunk.js.map → main.e071d0b6.chunk.js.map} +1 -1
- package/build/static/js/runtime-main.0ec50908.js +2 -0
- package/build/static/js/runtime-main.0ec50908.js.map +1 -0
- package/package.json +4 -4
- package/build/static/js/10.5038f4e4.chunk.js +0 -2
- package/build/static/js/10.5038f4e4.chunk.js.map +0 -1
- package/build/static/js/4.07f80d65.chunk.js.map +0 -1
- package/build/static/js/5.8a1668dc.chunk.js +0 -2
- package/build/static/js/5.8a1668dc.chunk.js.map +0 -1
- package/build/static/js/6.11aee62c.chunk.js +0 -2
- package/build/static/js/6.11aee62c.chunk.js.map +0 -1
- package/build/static/js/7.c53ed1ae.chunk.js +0 -2
- package/build/static/js/7.c53ed1ae.chunk.js.map +0 -1
- package/build/static/js/main.809e79d6.chunk.js +0 -2
- package/build/static/js/runtime-main.1cbbf81f.js +0 -2
- package/build/static/js/runtime-main.1cbbf81f.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 11.
|
|
2
|
-
(this["webpackJsonpconstruct-hub-webapp"]=this["webpackJsonpconstruct-hub-webapp"]||[]).push([[11],{272:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r(76),n=Object(i.a)({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"})},300:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r(76),n=Object(i.a)({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"})},301:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r(76),n=Object(i.a)({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"})},576:function(e,t,r){var i,n;!function(){var s,o=function e(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};o.version="2.3.9",(o.utils={}).warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),o.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},o.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var n=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!==typeof s&&"number"!==typeof s&&"boolean"!==typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[n]=s}}return t},(o.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r}).joiner="/",o.FieldRef.fromString=function(e){var t=e.indexOf(o.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var r=e.slice(0,t),i=e.slice(t+1);return new o.FieldRef(i,r,e)},o.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+o.FieldRef.joiner+this.docRef),this._stringValue},(o.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0}).complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},o.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},o.Set.prototype.contains=function(e){return!!this.elements[e]},o.Set.prototype.intersect=function(e){var t,r,i,n=[];if(e===o.Set.complete)return this;if(e===o.Set.empty)return e;this.length<e.length?(t=this,r=e):(t=e,r=this),i=Object.keys(t.elements);for(var s=0;s<i.length;s++){var a=i[s];a in r.elements&&n.push(a)}return new o.Set(n)},o.Set.prototype.union=function(e){return e===o.Set.complete?o.Set.complete:e===o.Set.empty?this:new o.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},o.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},(o.Token=function(e,t){this.str=e||"",this.metadata=t||{}}).prototype.toString=function(){return this.str},o.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},o.Token.prototype.clone=function(e){return new o.Token((e=e||function(e){return e})(this.str,this.metadata),this.metadata)},(o.tokenizer=function(e,t){if(null==e||void 0==e)return[];if(Array.isArray(e))return e.map((function(e){return new o.Token(o.utils.asString(e).toLowerCase(),o.utils.clone(t))}));for(var r=e.toString().toLowerCase(),i=r.length,n=[],s=0,a=0;s<=i;s++){var u=s-a;if(r.charAt(s).match(o.tokenizer.separator)||s==i){if(u>0){var l=o.utils.clone(t)||{};l.position=[a,u],l.index=n.length,n.push(new o.Token(r.slice(a,s),l))}a=s+1}}return n}).separator=/[\s\-]+/,(o.Pipeline=function(){this._stack=[]}).registeredFunctions=Object.create(null),o.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&o.utils.warn("Overwriting existing registered function: "+t),e.label=t,o.Pipeline.registeredFunctions[e.label]=e},o.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||o.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},o.Pipeline.load=function(e){var t=new o.Pipeline;return e.forEach((function(e){var r=o.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},o.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){o.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},o.Pipeline.prototype.after=function(e,t){o.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},o.Pipeline.prototype.before=function(e,t){o.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},o.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},o.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var i=this._stack[r],n=[],s=0;s<e.length;s++){var o=i(e[s],s,e);if(null!==o&&void 0!==o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)n.push(o[a]);else n.push(o)}e=n}return e},o.Pipeline.prototype.runString=function(e,t){var r=new o.Token(e,t);return this.run([r]).map((function(e){return e.toString()}))},o.Pipeline.prototype.reset=function(){this._stack=[]},o.Pipeline.prototype.toJSON=function(){return this._stack.map((function(e){return o.Pipeline.warnIfFunctionNotRegistered(e),e.label}))},(o.Vector=function(e){this._magnitude=0,this.elements=e||[]}).prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,i=r-t,n=Math.floor(i/2),s=this.elements[2*n];i>1&&(s<e&&(t=n),s>e&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e||s>e?2*n:s<e?2*(n+1):void 0},o.Vector.prototype.insert=function(e,t){this.upsert(e,t,(function(){throw"duplicate index"}))},o.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],t):this.elements.splice(i,0,e,t)},o.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;r<t;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},o.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,i=e.elements,n=r.length,s=i.length,o=0,a=0,u=0,l=0;u<n&&l<s;)(o=r[u])<(a=i[l])?u+=2:o>a?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},o.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},o.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t<this.elements.length;t+=2,r++)e[r]=this.elements[t];return e},o.Vector.prototype.toJSON=function(){return this.elements},o.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[aeiouy]",i="[^aeiou][^aeiouy]*",n=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),s=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),o=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),a=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy]"),u=/^(.+?)(ss|i)es$/,l=/^(.+?)([^s])s$/,c=/^(.+?)eed$/,h=/^(.+?)(ed|ing)$/,d=/.$/,f=/(at|bl|iz)$/,p=new RegExp("([^aeiouylsz])\\1$"),y=new RegExp("^"+i+r+"[^aeiouwxy]$"),m=/^(.+?[^aeiou])y$/,g=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,v=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,x=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,w=/^(.+?)(s|t)(ion)$/,Q=/^(.+?)e$/,k=/ll$/,S=new RegExp("^"+i+r+"[^aeiouwxy]$"),L=function(r){var i,L,E,b,P,T,O;if(r.length<3)return r;if("y"==(E=r.substr(0,1))&&(r=E.toUpperCase()+r.substr(1)),P=l,(b=u).test(r)?r=r.replace(b,"$1$2"):P.test(r)&&(r=r.replace(P,"$1$2")),P=h,(b=c).test(r)){var I=b.exec(r);(b=n).test(I[1])&&(b=d,r=r.replace(b,""))}else if(P.test(r)){i=(I=P.exec(r))[1],(P=a).test(i)&&(T=p,O=y,(P=f).test(r=i)?r+="e":T.test(r)?(b=d,r=r.replace(b,"")):O.test(r)&&(r+="e"))}(b=m).test(r)&&(r=(i=(I=b.exec(r))[1])+"i");(b=g).test(r)&&(i=(I=b.exec(r))[1],L=I[2],(b=n).test(i)&&(r=i+e[L]));(b=v).test(r)&&(i=(I=b.exec(r))[1],L=I[2],(b=n).test(i)&&(r=i+t[L]));if(P=w,(b=x).test(r))i=(I=b.exec(r))[1],(b=s).test(i)&&(r=i);else if(P.test(r)){i=(I=P.exec(r))[1]+I[2],(P=s).test(i)&&(r=i)}(b=Q).test(r)&&(i=(I=b.exec(r))[1],P=o,T=S,((b=s).test(i)||P.test(i)&&!T.test(i))&&(r=i));return P=s,(b=k).test(r)&&P.test(r)&&(b=d,r=r.replace(b,"")),"y"==E&&(r=E.toLowerCase()+r.substr(1)),r};return function(e){return e.update(L)}}(),o.Pipeline.registerFunction(o.stemmer,"stemmer"),o.generateStopWordFilter=function(e){var t=e.reduce((function(e,t){return e[t]=t,e}),{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},o.stopWordFilter=o.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),o.Pipeline.registerFunction(o.stopWordFilter,"stopWordFilter"),o.trimmer=function(e){return e.update((function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")}))},o.Pipeline.registerFunction(o.trimmer,"trimmer"),(o.TokenSet=function(){this.final=!1,this.edges={},this.id=o.TokenSet._nextId,o.TokenSet._nextId+=1})._nextId=1,o.TokenSet.fromArray=function(e){for(var t=new o.TokenSet.Builder,r=0,i=e.length;r<i;r++)t.insert(e[r]);return t.finish(),t.root},o.TokenSet.fromClause=function(e){return"editDistance"in e?o.TokenSet.fromFuzzyString(e.term,e.editDistance):o.TokenSet.fromString(e.term)},o.TokenSet.fromFuzzyString=function(e,t){for(var r=new o.TokenSet,i=[{node:r,editsRemaining:t,str:e}];i.length;){var n=i.pop();if(n.str.length>0){var s,a=n.str.charAt(0);a in n.node.edges?s=n.node.edges[a]:(s=new o.TokenSet,n.node.edges[a]=s),1==n.str.length&&(s.final=!0),i.push({node:s,editsRemaining:n.editsRemaining,str:n.str.slice(1)})}if(0!=n.editsRemaining){if("*"in n.node.edges)var u=n.node.edges["*"];else{u=new o.TokenSet;n.node.edges["*"]=u}if(0==n.str.length&&(u.final=!0),i.push({node:u,editsRemaining:n.editsRemaining-1,str:n.str}),n.str.length>1&&i.push({node:n.node,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)}),1==n.str.length&&(n.node.final=!0),n.str.length>=1){if("*"in n.node.edges)var l=n.node.edges["*"];else{l=new o.TokenSet;n.node.edges["*"]=l}1==n.str.length&&(l.final=!0),i.push({node:l,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)})}if(n.str.length>1){var c,h=n.str.charAt(0),d=n.str.charAt(1);d in n.node.edges?c=n.node.edges[d]:(c=new o.TokenSet,n.node.edges[d]=c),1==n.str.length&&(c.final=!0),i.push({node:c,editsRemaining:n.editsRemaining-1,str:h+n.str.slice(2)})}}}return r},o.TokenSet.fromString=function(e){for(var t=new o.TokenSet,r=t,i=0,n=e.length;i<n;i++){var s=e[i],a=i==n-1;if("*"==s)t.edges[s]=t,t.final=a;else{var u=new o.TokenSet;u.final=a,t.edges[s]=u,t=u}}return r},o.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),i=Object.keys(r.node.edges),n=i.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var s=0;s<n;s++){var o=i[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},o.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,i=0;i<r;i++){var n=t[i];e=e+n+this.edges[n].id}return e},o.TokenSet.prototype.intersect=function(e){for(var t=new o.TokenSet,r=void 0,i=[{qNode:e,output:t,node:this}];i.length;){r=i.pop();for(var n=Object.keys(r.qNode.edges),s=n.length,a=Object.keys(r.node.edges),u=a.length,l=0;l<s;l++)for(var c=n[l],h=0;h<u;h++){var d=a[h];if(d==c||"*"==c){var f=r.node.edges[d],p=r.qNode.edges[c],y=f.final&&p.final,m=void 0;d in r.output.edges?(m=r.output.edges[d]).final=m.final||y:((m=new o.TokenSet).final=y,r.output.edges[d]=m),i.push({qNode:p,output:m,node:f})}}}return t},o.TokenSet.Builder=function(){this.previousWord="",this.root=new o.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},o.TokenSet.Builder.prototype.insert=function(e){var t,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length&&e[i]==this.previousWord[i];i++)r++;this.minimize(r),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(i=r;i<e.length;i++){var n=new o.TokenSet,s=e[i];t.edges[s]=n,this.uncheckedNodes.push({parent:t,char:s,child:n}),t=n}t.final=!0,this.previousWord=e},o.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},o.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},(o.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline}).prototype.search=function(e){return this.query((function(t){new o.QueryParser(e,t).parse()}))},o.Index.prototype.query=function(e){for(var t=new o.Query(this.fields),r=Object.create(null),i=Object.create(null),n=Object.create(null),s=Object.create(null),a=Object.create(null),u=0;u<this.fields.length;u++)i[this.fields[u]]=new o.Vector;e.call(t,t);for(u=0;u<t.clauses.length;u++){var l=t.clauses[u],c=null,h=o.Set.empty;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var d=0;d<c.length;d++){var f=c[d];l.term=f;var p=o.TokenSet.fromClause(l),y=this.tokenSet.intersect(p).toArray();if(0===y.length&&l.presence===o.Query.presence.REQUIRED){for(var m=0;m<l.fields.length;m++){s[F=l.fields[m]]=o.Set.empty}break}for(var g=0;g<y.length;g++){var v=y[g],x=this.invertedIndex[v],w=x._index;for(m=0;m<l.fields.length;m++){var Q=x[F=l.fields[m]],k=Object.keys(Q),S=v+"/"+F,L=new o.Set(k);if(l.presence==o.Query.presence.REQUIRED&&(h=h.union(L),void 0===s[F]&&(s[F]=o.Set.complete)),l.presence!=o.Query.presence.PROHIBITED){if(i[F].upsert(w,l.boost,(function(e,t){return e+t})),!n[S]){for(var E=0;E<k.length;E++){var b,P=k[E],T=new o.FieldRef(P,F),O=Q[P];void 0===(b=r[T])?r[T]=new o.MatchData(v,F,O):b.add(v,F,O)}n[S]=!0}}else void 0===a[F]&&(a[F]=o.Set.empty),a[F]=a[F].union(L)}}}if(l.presence===o.Query.presence.REQUIRED)for(m=0;m<l.fields.length;m++){s[F=l.fields[m]]=s[F].intersect(h)}}var I=o.Set.complete,R=o.Set.empty;for(u=0;u<this.fields.length;u++){var F;s[F=this.fields[u]]&&(I=I.intersect(s[F])),a[F]&&(R=R.union(a[F]))}var C=Object.keys(r),N=[],j=Object.create(null);if(t.isNegated()){C=Object.keys(this.fieldVectors);for(u=0;u<C.length;u++){T=C[u];var _=o.FieldRef.fromString(T);r[T]=new o.MatchData}}for(u=0;u<C.length;u++){var D=(_=o.FieldRef.fromString(C[u])).docRef;if(I.contains(D)&&!R.contains(D)){var A,B=this.fieldVectors[_],z=i[_.fieldName].similarity(B);if(void 0!==(A=j[D]))A.score+=z,A.matchData.combine(r[_]);else{var V={ref:D,score:z,matchData:r[_]};j[D]=V,N.push(V)}}}return N.sort((function(e,t){return t.score-e.score}))},o.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map((function(e){return[e,this.invertedIndex[e]]}),this),t=Object.keys(this.fieldVectors).map((function(e){return[e,this.fieldVectors[e].toJSON()]}),this);return{version:o.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},o.Index.load=function(e){var t={},r={},i=e.fieldVectors,n=Object.create(null),s=e.invertedIndex,a=new o.TokenSet.Builder,u=o.Pipeline.load(e.pipeline);e.version!=o.version&&o.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+o.version+"' does not match serialized index '"+e.version+"'");for(var l=0;l<i.length;l++){var c=(d=i[l])[0],h=d[1];r[c]=new o.Vector(h)}for(l=0;l<s.length;l++){var d,f=(d=s[l])[0],p=d[1];a.insert(f),n[f]=p}return a.finish(),t.fields=e.fields,t.fieldVectors=r,t.invertedIndex=n,t.tokenSet=a.root,t.pipeline=u,new o.Index(t)},(o.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=o.tokenizer,this.pipeline=new o.Pipeline,this.searchPipeline=new o.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]}).prototype.ref=function(e){this._ref=e},o.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},o.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},o.Builder.prototype.k1=function(e){this._k1=e},o.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var n=0;n<i.length;n++){var s=i[n],a=this._fields[s].extractor,u=a?a(e):e[s],l=this.tokenizer(u,{fields:[s]}),c=this.pipeline.run(l),h=new o.FieldRef(r,s),d=Object.create(null);this.fieldTermFrequencies[h]=d,this.fieldLengths[h]=0,this.fieldLengths[h]+=c.length;for(var f=0;f<c.length;f++){var p=c[f];if(void 0==d[p]&&(d[p]=0),d[p]+=1,void 0==this.invertedIndex[p]){var y=Object.create(null);y._index=this.termIndex,this.termIndex+=1;for(var m=0;m<i.length;m++)y[i[m]]=Object.create(null);this.invertedIndex[p]=y}void 0==this.invertedIndex[p][s][r]&&(this.invertedIndex[p][s][r]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var v=this.metadataWhitelist[g],x=p.metadata[v];void 0==this.invertedIndex[p][s][r][v]&&(this.invertedIndex[p][s][r][v]=[]),this.invertedIndex[p][s][r][v].push(x)}}}},o.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,r={},i={},n=0;n<t;n++){var s=o.FieldRef.fromString(e[n]),a=s.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[s]}var u=Object.keys(this._fields);for(n=0;n<u.length;n++){var l=u[n];r[l]=r[l]/i[l]}this.averageFieldLength=r},o.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),r=t.length,i=Object.create(null),n=0;n<r;n++){for(var s=o.FieldRef.fromString(t[n]),a=s.fieldName,u=this.fieldLengths[s],l=new o.Vector,c=this.fieldTermFrequencies[s],h=Object.keys(c),d=h.length,f=this._fields[a].boost||1,p=this._documents[s.docRef].boost||1,y=0;y<d;y++){var m,g,v,x=h[y],w=c[x],Q=this.invertedIndex[x]._index;void 0===i[x]?(m=o.idf(this.invertedIndex[x],this.documentCount),i[x]=m):m=i[x],g=m*((this._k1+1)*w)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+w),g*=f,g*=p,v=Math.round(1e3*g)/1e3,l.insert(Q,v)}e[s]=l}this.fieldVectors=e},o.Builder.prototype.createTokenSet=function(){this.tokenSet=o.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},o.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new o.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},o.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},(o.MatchData=function(e,t,r){for(var i=Object.create(null),n=Object.keys(r||{}),s=0;s<n.length;s++){var o=n[s];i[o]=r[o].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=i)}).prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r<t.length;r++){var i=t[r],n=Object.keys(e.metadata[i]);void 0==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var s=0;s<n.length;s++){var o=n[s],a=Object.keys(e.metadata[i][o]);void 0==this.metadata[i][o]&&(this.metadata[i][o]=Object.create(null));for(var u=0;u<a.length;u++){var l=a[u];void 0==this.metadata[i][o][l]?this.metadata[i][o][l]=e.metadata[i][o][l]:this.metadata[i][o][l]=this.metadata[i][o][l].concat(e.metadata[i][o][l])}}}},o.MatchData.prototype.add=function(e,t,r){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=r);if(t in this.metadata[e])for(var i=Object.keys(r),n=0;n<i.length;n++){var s=i[n];s in this.metadata[e][t]?this.metadata[e][t][s]=this.metadata[e][t][s].concat(r[s]):this.metadata[e][t][s]=r[s]}else this.metadata[e][t]=r},(o.Query=function(e){this.clauses=[],this.allFields=e}).wildcard=new String("*"),o.Query.wildcard.NONE=0,o.Query.wildcard.LEADING=1,o.Query.wildcard.TRAILING=2,o.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},o.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=o.Query.wildcard.NONE),e.wildcard&o.Query.wildcard.LEADING&&e.term.charAt(0)!=o.Query.wildcard&&(e.term="*"+e.term),e.wildcard&o.Query.wildcard.TRAILING&&e.term.slice(-1)!=o.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=o.Query.presence.OPTIONAL),this.clauses.push(e),this},o.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=o.Query.presence.PROHIBITED)return!1;return!0},o.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach((function(e){this.term(e,o.utils.clone(t))}),this),this;var r=t||{};return r.term=e.toString(),this.clause(r),this},(o.QueryParseError=function(e,t,r){this.name="QueryParseError",this.message=e,this.start=t,this.end=r}).prototype=new Error,(o.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]}).prototype.run=function(){for(var e=o.QueryLexer.lexText;e;)e=e(this)},o.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(t,r)),t=r+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},o.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},o.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},o.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return o.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},o.QueryLexer.prototype.width=function(){return this.pos-this.start},o.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},o.QueryLexer.prototype.backup=function(){this.pos-=1},o.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=o.QueryLexer.EOS&&this.backup()},o.QueryLexer.prototype.more=function(){return this.pos<this.length},o.QueryLexer.EOS="EOS",o.QueryLexer.FIELD="FIELD",o.QueryLexer.TERM="TERM",o.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",o.QueryLexer.BOOST="BOOST",o.QueryLexer.PRESENCE="PRESENCE",o.QueryLexer.lexField=function(e){return e.backup(),e.emit(o.QueryLexer.FIELD),e.ignore(),o.QueryLexer.lexText},o.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(o.QueryLexer.TERM)),e.ignore(),e.more())return o.QueryLexer.lexText},o.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(o.QueryLexer.EDIT_DISTANCE),o.QueryLexer.lexText},o.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(o.QueryLexer.BOOST),o.QueryLexer.lexText},o.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(o.QueryLexer.TERM)},o.QueryLexer.termSeparator=o.tokenizer.separator,o.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==o.QueryLexer.EOS)return o.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return o.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(o.QueryLexer.TERM),o.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(o.QueryLexer.TERM),o.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(o.QueryLexer.PRESENCE),o.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(o.QueryLexer.PRESENCE),o.QueryLexer.lexText;if(t.match(o.QueryLexer.termSeparator))return o.QueryLexer.lexTerm}else e.escapeCharacter()}},(o.QueryParser=function(e,t){this.lexer=new o.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0}).prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=o.QueryParser.parseClause;e;)e=e(this);return this.query},o.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},o.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},o.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},o.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(void 0!=t)switch(t.type){case o.QueryLexer.PRESENCE:return o.QueryParser.parsePresence;case o.QueryLexer.FIELD:return o.QueryParser.parseField;case o.QueryLexer.TERM:return o.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new o.QueryParseError(r,t.start,t.end)}},o.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(void 0!=t){switch(t.str){case"-":e.currentClause.presence=o.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=o.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new o.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(void 0==i)throw new o.QueryParseError(r="expecting term or field, found nothing",t.start,t.end);switch(i.type){case o.QueryLexer.FIELD:return o.QueryParser.parseField;case o.QueryLexer.TERM:return o.QueryParser.parseTerm;default:r="expecting term or field, found '"+i.type+"'";throw new o.QueryParseError(r,i.start,i.end)}}},o.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(void 0!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new o.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var n=e.peekLexeme();if(void 0==n)throw new o.QueryParseError(i="expecting term, found nothing",t.start,t.end);if(n.type===o.QueryLexer.TERM)return o.QueryParser.parseTerm;i="expecting term, found '"+n.type+"'";throw new o.QueryParseError(i,n.start,n.end)}},o.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(void 0!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(void 0!=r)switch(r.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new o.QueryParseError(i,r.start,r.end)}else e.nextClause()}},o.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(void 0!=t){var r=parseInt(t.str,10);if(isNaN(r))throw new o.QueryParseError(n="edit distance must be numeric",t.start,t.end);e.currentClause.editDistance=r;var i=e.peekLexeme();if(void 0!=i)switch(i.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new o.QueryParseError(n,i.start,i.end)}else e.nextClause()}},o.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(void 0!=t){var r=parseInt(t.str,10);if(isNaN(r))throw new o.QueryParseError(n="boost must be numeric",t.start,t.end);e.currentClause.boost=r;var i=e.peekLexeme();if(void 0!=i)switch(i.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new o.QueryParseError(n,i.start,i.end)}else e.nextClause()}},void 0===(n="function"===typeof(i=function(){return o})?i.call(t,r,t,e):i)||(e.exports=n)}()}}]);
|
|
3
|
-
//# sourceMappingURL=11.
|
|
1
|
+
/*! For license information please see 11.7a407d94.chunk.js.LICENSE.txt */
|
|
2
|
+
(this["webpackJsonpconstruct-hub-webapp"]=this["webpackJsonpconstruct-hub-webapp"]||[]).push([[11],{298:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r(76),n=Object(i.a)({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"})},351:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r(76),n=Object(i.a)({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"})},352:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r(76),n=Object(i.a)({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"})},576:function(e,t,r){var i,n;!function(){var s,o=function e(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};o.version="2.3.9",(o.utils={}).warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),o.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},o.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var n=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!==typeof s&&"number"!==typeof s&&"boolean"!==typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[n]=s}}return t},(o.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r}).joiner="/",o.FieldRef.fromString=function(e){var t=e.indexOf(o.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var r=e.slice(0,t),i=e.slice(t+1);return new o.FieldRef(i,r,e)},o.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+o.FieldRef.joiner+this.docRef),this._stringValue},(o.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0}).complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},o.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},o.Set.prototype.contains=function(e){return!!this.elements[e]},o.Set.prototype.intersect=function(e){var t,r,i,n=[];if(e===o.Set.complete)return this;if(e===o.Set.empty)return e;this.length<e.length?(t=this,r=e):(t=e,r=this),i=Object.keys(t.elements);for(var s=0;s<i.length;s++){var a=i[s];a in r.elements&&n.push(a)}return new o.Set(n)},o.Set.prototype.union=function(e){return e===o.Set.complete?o.Set.complete:e===o.Set.empty?this:new o.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},o.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},(o.Token=function(e,t){this.str=e||"",this.metadata=t||{}}).prototype.toString=function(){return this.str},o.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},o.Token.prototype.clone=function(e){return new o.Token((e=e||function(e){return e})(this.str,this.metadata),this.metadata)},(o.tokenizer=function(e,t){if(null==e||void 0==e)return[];if(Array.isArray(e))return e.map((function(e){return new o.Token(o.utils.asString(e).toLowerCase(),o.utils.clone(t))}));for(var r=e.toString().toLowerCase(),i=r.length,n=[],s=0,a=0;s<=i;s++){var u=s-a;if(r.charAt(s).match(o.tokenizer.separator)||s==i){if(u>0){var l=o.utils.clone(t)||{};l.position=[a,u],l.index=n.length,n.push(new o.Token(r.slice(a,s),l))}a=s+1}}return n}).separator=/[\s\-]+/,(o.Pipeline=function(){this._stack=[]}).registeredFunctions=Object.create(null),o.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&o.utils.warn("Overwriting existing registered function: "+t),e.label=t,o.Pipeline.registeredFunctions[e.label]=e},o.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||o.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},o.Pipeline.load=function(e){var t=new o.Pipeline;return e.forEach((function(e){var r=o.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},o.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){o.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},o.Pipeline.prototype.after=function(e,t){o.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},o.Pipeline.prototype.before=function(e,t){o.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},o.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},o.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var i=this._stack[r],n=[],s=0;s<e.length;s++){var o=i(e[s],s,e);if(null!==o&&void 0!==o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)n.push(o[a]);else n.push(o)}e=n}return e},o.Pipeline.prototype.runString=function(e,t){var r=new o.Token(e,t);return this.run([r]).map((function(e){return e.toString()}))},o.Pipeline.prototype.reset=function(){this._stack=[]},o.Pipeline.prototype.toJSON=function(){return this._stack.map((function(e){return o.Pipeline.warnIfFunctionNotRegistered(e),e.label}))},(o.Vector=function(e){this._magnitude=0,this.elements=e||[]}).prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,i=r-t,n=Math.floor(i/2),s=this.elements[2*n];i>1&&(s<e&&(t=n),s>e&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e||s>e?2*n:s<e?2*(n+1):void 0},o.Vector.prototype.insert=function(e,t){this.upsert(e,t,(function(){throw"duplicate index"}))},o.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],t):this.elements.splice(i,0,e,t)},o.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;r<t;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},o.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,i=e.elements,n=r.length,s=i.length,o=0,a=0,u=0,l=0;u<n&&l<s;)(o=r[u])<(a=i[l])?u+=2:o>a?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},o.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},o.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t<this.elements.length;t+=2,r++)e[r]=this.elements[t];return e},o.Vector.prototype.toJSON=function(){return this.elements},o.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[aeiouy]",i="[^aeiou][^aeiouy]*",n=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),s=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),o=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),a=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy]"),u=/^(.+?)(ss|i)es$/,l=/^(.+?)([^s])s$/,c=/^(.+?)eed$/,h=/^(.+?)(ed|ing)$/,d=/.$/,f=/(at|bl|iz)$/,p=new RegExp("([^aeiouylsz])\\1$"),y=new RegExp("^"+i+r+"[^aeiouwxy]$"),m=/^(.+?[^aeiou])y$/,g=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,v=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,x=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,w=/^(.+?)(s|t)(ion)$/,Q=/^(.+?)e$/,k=/ll$/,S=new RegExp("^"+i+r+"[^aeiouwxy]$"),L=function(r){var i,L,E,b,P,T,O;if(r.length<3)return r;if("y"==(E=r.substr(0,1))&&(r=E.toUpperCase()+r.substr(1)),P=l,(b=u).test(r)?r=r.replace(b,"$1$2"):P.test(r)&&(r=r.replace(P,"$1$2")),P=h,(b=c).test(r)){var I=b.exec(r);(b=n).test(I[1])&&(b=d,r=r.replace(b,""))}else if(P.test(r)){i=(I=P.exec(r))[1],(P=a).test(i)&&(T=p,O=y,(P=f).test(r=i)?r+="e":T.test(r)?(b=d,r=r.replace(b,"")):O.test(r)&&(r+="e"))}(b=m).test(r)&&(r=(i=(I=b.exec(r))[1])+"i");(b=g).test(r)&&(i=(I=b.exec(r))[1],L=I[2],(b=n).test(i)&&(r=i+e[L]));(b=v).test(r)&&(i=(I=b.exec(r))[1],L=I[2],(b=n).test(i)&&(r=i+t[L]));if(P=w,(b=x).test(r))i=(I=b.exec(r))[1],(b=s).test(i)&&(r=i);else if(P.test(r)){i=(I=P.exec(r))[1]+I[2],(P=s).test(i)&&(r=i)}(b=Q).test(r)&&(i=(I=b.exec(r))[1],P=o,T=S,((b=s).test(i)||P.test(i)&&!T.test(i))&&(r=i));return P=s,(b=k).test(r)&&P.test(r)&&(b=d,r=r.replace(b,"")),"y"==E&&(r=E.toLowerCase()+r.substr(1)),r};return function(e){return e.update(L)}}(),o.Pipeline.registerFunction(o.stemmer,"stemmer"),o.generateStopWordFilter=function(e){var t=e.reduce((function(e,t){return e[t]=t,e}),{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},o.stopWordFilter=o.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),o.Pipeline.registerFunction(o.stopWordFilter,"stopWordFilter"),o.trimmer=function(e){return e.update((function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")}))},o.Pipeline.registerFunction(o.trimmer,"trimmer"),(o.TokenSet=function(){this.final=!1,this.edges={},this.id=o.TokenSet._nextId,o.TokenSet._nextId+=1})._nextId=1,o.TokenSet.fromArray=function(e){for(var t=new o.TokenSet.Builder,r=0,i=e.length;r<i;r++)t.insert(e[r]);return t.finish(),t.root},o.TokenSet.fromClause=function(e){return"editDistance"in e?o.TokenSet.fromFuzzyString(e.term,e.editDistance):o.TokenSet.fromString(e.term)},o.TokenSet.fromFuzzyString=function(e,t){for(var r=new o.TokenSet,i=[{node:r,editsRemaining:t,str:e}];i.length;){var n=i.pop();if(n.str.length>0){var s,a=n.str.charAt(0);a in n.node.edges?s=n.node.edges[a]:(s=new o.TokenSet,n.node.edges[a]=s),1==n.str.length&&(s.final=!0),i.push({node:s,editsRemaining:n.editsRemaining,str:n.str.slice(1)})}if(0!=n.editsRemaining){if("*"in n.node.edges)var u=n.node.edges["*"];else{u=new o.TokenSet;n.node.edges["*"]=u}if(0==n.str.length&&(u.final=!0),i.push({node:u,editsRemaining:n.editsRemaining-1,str:n.str}),n.str.length>1&&i.push({node:n.node,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)}),1==n.str.length&&(n.node.final=!0),n.str.length>=1){if("*"in n.node.edges)var l=n.node.edges["*"];else{l=new o.TokenSet;n.node.edges["*"]=l}1==n.str.length&&(l.final=!0),i.push({node:l,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)})}if(n.str.length>1){var c,h=n.str.charAt(0),d=n.str.charAt(1);d in n.node.edges?c=n.node.edges[d]:(c=new o.TokenSet,n.node.edges[d]=c),1==n.str.length&&(c.final=!0),i.push({node:c,editsRemaining:n.editsRemaining-1,str:h+n.str.slice(2)})}}}return r},o.TokenSet.fromString=function(e){for(var t=new o.TokenSet,r=t,i=0,n=e.length;i<n;i++){var s=e[i],a=i==n-1;if("*"==s)t.edges[s]=t,t.final=a;else{var u=new o.TokenSet;u.final=a,t.edges[s]=u,t=u}}return r},o.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),i=Object.keys(r.node.edges),n=i.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var s=0;s<n;s++){var o=i[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},o.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,i=0;i<r;i++){var n=t[i];e=e+n+this.edges[n].id}return e},o.TokenSet.prototype.intersect=function(e){for(var t=new o.TokenSet,r=void 0,i=[{qNode:e,output:t,node:this}];i.length;){r=i.pop();for(var n=Object.keys(r.qNode.edges),s=n.length,a=Object.keys(r.node.edges),u=a.length,l=0;l<s;l++)for(var c=n[l],h=0;h<u;h++){var d=a[h];if(d==c||"*"==c){var f=r.node.edges[d],p=r.qNode.edges[c],y=f.final&&p.final,m=void 0;d in r.output.edges?(m=r.output.edges[d]).final=m.final||y:((m=new o.TokenSet).final=y,r.output.edges[d]=m),i.push({qNode:p,output:m,node:f})}}}return t},o.TokenSet.Builder=function(){this.previousWord="",this.root=new o.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},o.TokenSet.Builder.prototype.insert=function(e){var t,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length&&e[i]==this.previousWord[i];i++)r++;this.minimize(r),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(i=r;i<e.length;i++){var n=new o.TokenSet,s=e[i];t.edges[s]=n,this.uncheckedNodes.push({parent:t,char:s,child:n}),t=n}t.final=!0,this.previousWord=e},o.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},o.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},(o.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline}).prototype.search=function(e){return this.query((function(t){new o.QueryParser(e,t).parse()}))},o.Index.prototype.query=function(e){for(var t=new o.Query(this.fields),r=Object.create(null),i=Object.create(null),n=Object.create(null),s=Object.create(null),a=Object.create(null),u=0;u<this.fields.length;u++)i[this.fields[u]]=new o.Vector;e.call(t,t);for(u=0;u<t.clauses.length;u++){var l=t.clauses[u],c=null,h=o.Set.empty;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var d=0;d<c.length;d++){var f=c[d];l.term=f;var p=o.TokenSet.fromClause(l),y=this.tokenSet.intersect(p).toArray();if(0===y.length&&l.presence===o.Query.presence.REQUIRED){for(var m=0;m<l.fields.length;m++){s[F=l.fields[m]]=o.Set.empty}break}for(var g=0;g<y.length;g++){var v=y[g],x=this.invertedIndex[v],w=x._index;for(m=0;m<l.fields.length;m++){var Q=x[F=l.fields[m]],k=Object.keys(Q),S=v+"/"+F,L=new o.Set(k);if(l.presence==o.Query.presence.REQUIRED&&(h=h.union(L),void 0===s[F]&&(s[F]=o.Set.complete)),l.presence!=o.Query.presence.PROHIBITED){if(i[F].upsert(w,l.boost,(function(e,t){return e+t})),!n[S]){for(var E=0;E<k.length;E++){var b,P=k[E],T=new o.FieldRef(P,F),O=Q[P];void 0===(b=r[T])?r[T]=new o.MatchData(v,F,O):b.add(v,F,O)}n[S]=!0}}else void 0===a[F]&&(a[F]=o.Set.empty),a[F]=a[F].union(L)}}}if(l.presence===o.Query.presence.REQUIRED)for(m=0;m<l.fields.length;m++){s[F=l.fields[m]]=s[F].intersect(h)}}var I=o.Set.complete,R=o.Set.empty;for(u=0;u<this.fields.length;u++){var F;s[F=this.fields[u]]&&(I=I.intersect(s[F])),a[F]&&(R=R.union(a[F]))}var C=Object.keys(r),N=[],j=Object.create(null);if(t.isNegated()){C=Object.keys(this.fieldVectors);for(u=0;u<C.length;u++){T=C[u];var _=o.FieldRef.fromString(T);r[T]=new o.MatchData}}for(u=0;u<C.length;u++){var D=(_=o.FieldRef.fromString(C[u])).docRef;if(I.contains(D)&&!R.contains(D)){var A,B=this.fieldVectors[_],z=i[_.fieldName].similarity(B);if(void 0!==(A=j[D]))A.score+=z,A.matchData.combine(r[_]);else{var V={ref:D,score:z,matchData:r[_]};j[D]=V,N.push(V)}}}return N.sort((function(e,t){return t.score-e.score}))},o.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map((function(e){return[e,this.invertedIndex[e]]}),this),t=Object.keys(this.fieldVectors).map((function(e){return[e,this.fieldVectors[e].toJSON()]}),this);return{version:o.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},o.Index.load=function(e){var t={},r={},i=e.fieldVectors,n=Object.create(null),s=e.invertedIndex,a=new o.TokenSet.Builder,u=o.Pipeline.load(e.pipeline);e.version!=o.version&&o.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+o.version+"' does not match serialized index '"+e.version+"'");for(var l=0;l<i.length;l++){var c=(d=i[l])[0],h=d[1];r[c]=new o.Vector(h)}for(l=0;l<s.length;l++){var d,f=(d=s[l])[0],p=d[1];a.insert(f),n[f]=p}return a.finish(),t.fields=e.fields,t.fieldVectors=r,t.invertedIndex=n,t.tokenSet=a.root,t.pipeline=u,new o.Index(t)},(o.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=o.tokenizer,this.pipeline=new o.Pipeline,this.searchPipeline=new o.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]}).prototype.ref=function(e){this._ref=e},o.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},o.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},o.Builder.prototype.k1=function(e){this._k1=e},o.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var n=0;n<i.length;n++){var s=i[n],a=this._fields[s].extractor,u=a?a(e):e[s],l=this.tokenizer(u,{fields:[s]}),c=this.pipeline.run(l),h=new o.FieldRef(r,s),d=Object.create(null);this.fieldTermFrequencies[h]=d,this.fieldLengths[h]=0,this.fieldLengths[h]+=c.length;for(var f=0;f<c.length;f++){var p=c[f];if(void 0==d[p]&&(d[p]=0),d[p]+=1,void 0==this.invertedIndex[p]){var y=Object.create(null);y._index=this.termIndex,this.termIndex+=1;for(var m=0;m<i.length;m++)y[i[m]]=Object.create(null);this.invertedIndex[p]=y}void 0==this.invertedIndex[p][s][r]&&(this.invertedIndex[p][s][r]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var v=this.metadataWhitelist[g],x=p.metadata[v];void 0==this.invertedIndex[p][s][r][v]&&(this.invertedIndex[p][s][r][v]=[]),this.invertedIndex[p][s][r][v].push(x)}}}},o.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,r={},i={},n=0;n<t;n++){var s=o.FieldRef.fromString(e[n]),a=s.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[s]}var u=Object.keys(this._fields);for(n=0;n<u.length;n++){var l=u[n];r[l]=r[l]/i[l]}this.averageFieldLength=r},o.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),r=t.length,i=Object.create(null),n=0;n<r;n++){for(var s=o.FieldRef.fromString(t[n]),a=s.fieldName,u=this.fieldLengths[s],l=new o.Vector,c=this.fieldTermFrequencies[s],h=Object.keys(c),d=h.length,f=this._fields[a].boost||1,p=this._documents[s.docRef].boost||1,y=0;y<d;y++){var m,g,v,x=h[y],w=c[x],Q=this.invertedIndex[x]._index;void 0===i[x]?(m=o.idf(this.invertedIndex[x],this.documentCount),i[x]=m):m=i[x],g=m*((this._k1+1)*w)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+w),g*=f,g*=p,v=Math.round(1e3*g)/1e3,l.insert(Q,v)}e[s]=l}this.fieldVectors=e},o.Builder.prototype.createTokenSet=function(){this.tokenSet=o.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},o.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new o.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},o.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},(o.MatchData=function(e,t,r){for(var i=Object.create(null),n=Object.keys(r||{}),s=0;s<n.length;s++){var o=n[s];i[o]=r[o].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=i)}).prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r<t.length;r++){var i=t[r],n=Object.keys(e.metadata[i]);void 0==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var s=0;s<n.length;s++){var o=n[s],a=Object.keys(e.metadata[i][o]);void 0==this.metadata[i][o]&&(this.metadata[i][o]=Object.create(null));for(var u=0;u<a.length;u++){var l=a[u];void 0==this.metadata[i][o][l]?this.metadata[i][o][l]=e.metadata[i][o][l]:this.metadata[i][o][l]=this.metadata[i][o][l].concat(e.metadata[i][o][l])}}}},o.MatchData.prototype.add=function(e,t,r){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=r);if(t in this.metadata[e])for(var i=Object.keys(r),n=0;n<i.length;n++){var s=i[n];s in this.metadata[e][t]?this.metadata[e][t][s]=this.metadata[e][t][s].concat(r[s]):this.metadata[e][t][s]=r[s]}else this.metadata[e][t]=r},(o.Query=function(e){this.clauses=[],this.allFields=e}).wildcard=new String("*"),o.Query.wildcard.NONE=0,o.Query.wildcard.LEADING=1,o.Query.wildcard.TRAILING=2,o.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},o.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=o.Query.wildcard.NONE),e.wildcard&o.Query.wildcard.LEADING&&e.term.charAt(0)!=o.Query.wildcard&&(e.term="*"+e.term),e.wildcard&o.Query.wildcard.TRAILING&&e.term.slice(-1)!=o.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=o.Query.presence.OPTIONAL),this.clauses.push(e),this},o.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=o.Query.presence.PROHIBITED)return!1;return!0},o.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach((function(e){this.term(e,o.utils.clone(t))}),this),this;var r=t||{};return r.term=e.toString(),this.clause(r),this},(o.QueryParseError=function(e,t,r){this.name="QueryParseError",this.message=e,this.start=t,this.end=r}).prototype=new Error,(o.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]}).prototype.run=function(){for(var e=o.QueryLexer.lexText;e;)e=e(this)},o.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(t,r)),t=r+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},o.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},o.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},o.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return o.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},o.QueryLexer.prototype.width=function(){return this.pos-this.start},o.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},o.QueryLexer.prototype.backup=function(){this.pos-=1},o.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=o.QueryLexer.EOS&&this.backup()},o.QueryLexer.prototype.more=function(){return this.pos<this.length},o.QueryLexer.EOS="EOS",o.QueryLexer.FIELD="FIELD",o.QueryLexer.TERM="TERM",o.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",o.QueryLexer.BOOST="BOOST",o.QueryLexer.PRESENCE="PRESENCE",o.QueryLexer.lexField=function(e){return e.backup(),e.emit(o.QueryLexer.FIELD),e.ignore(),o.QueryLexer.lexText},o.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(o.QueryLexer.TERM)),e.ignore(),e.more())return o.QueryLexer.lexText},o.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(o.QueryLexer.EDIT_DISTANCE),o.QueryLexer.lexText},o.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(o.QueryLexer.BOOST),o.QueryLexer.lexText},o.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(o.QueryLexer.TERM)},o.QueryLexer.termSeparator=o.tokenizer.separator,o.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==o.QueryLexer.EOS)return o.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return o.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(o.QueryLexer.TERM),o.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(o.QueryLexer.TERM),o.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(o.QueryLexer.PRESENCE),o.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(o.QueryLexer.PRESENCE),o.QueryLexer.lexText;if(t.match(o.QueryLexer.termSeparator))return o.QueryLexer.lexTerm}else e.escapeCharacter()}},(o.QueryParser=function(e,t){this.lexer=new o.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0}).prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=o.QueryParser.parseClause;e;)e=e(this);return this.query},o.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},o.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},o.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},o.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(void 0!=t)switch(t.type){case o.QueryLexer.PRESENCE:return o.QueryParser.parsePresence;case o.QueryLexer.FIELD:return o.QueryParser.parseField;case o.QueryLexer.TERM:return o.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new o.QueryParseError(r,t.start,t.end)}},o.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(void 0!=t){switch(t.str){case"-":e.currentClause.presence=o.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=o.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new o.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(void 0==i)throw new o.QueryParseError(r="expecting term or field, found nothing",t.start,t.end);switch(i.type){case o.QueryLexer.FIELD:return o.QueryParser.parseField;case o.QueryLexer.TERM:return o.QueryParser.parseTerm;default:r="expecting term or field, found '"+i.type+"'";throw new o.QueryParseError(r,i.start,i.end)}}},o.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(void 0!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new o.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var n=e.peekLexeme();if(void 0==n)throw new o.QueryParseError(i="expecting term, found nothing",t.start,t.end);if(n.type===o.QueryLexer.TERM)return o.QueryParser.parseTerm;i="expecting term, found '"+n.type+"'";throw new o.QueryParseError(i,n.start,n.end)}},o.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(void 0!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(void 0!=r)switch(r.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new o.QueryParseError(i,r.start,r.end)}else e.nextClause()}},o.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(void 0!=t){var r=parseInt(t.str,10);if(isNaN(r))throw new o.QueryParseError(n="edit distance must be numeric",t.start,t.end);e.currentClause.editDistance=r;var i=e.peekLexeme();if(void 0!=i)switch(i.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new o.QueryParseError(n,i.start,i.end)}else e.nextClause()}},o.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(void 0!=t){var r=parseInt(t.str,10);if(isNaN(r))throw new o.QueryParseError(n="boost must be numeric",t.start,t.end);e.currentClause.boost=r;var i=e.peekLexeme();if(void 0!=i)switch(i.type){case o.QueryLexer.TERM:return e.nextClause(),o.QueryParser.parseTerm;case o.QueryLexer.FIELD:return e.nextClause(),o.QueryParser.parseField;case o.QueryLexer.EDIT_DISTANCE:return o.QueryParser.parseEditDistance;case o.QueryLexer.BOOST:return o.QueryParser.parseBoost;case o.QueryLexer.PRESENCE:return e.nextClause(),o.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new o.QueryParseError(n,i.start,i.end)}else e.nextClause()}},void 0===(n="function"===typeof(i=function(){return o})?i.call(t,r,t,e):i)||(e.exports=n)}()}}]);
|
|
3
|
+
//# sourceMappingURL=11.7a407d94.chunk.js.map
|
package/build/static/js/{11.3e7ab347.chunk.js.LICENSE.txt → 11.7a407d94.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|