flexsearch
Advanced tools
Comparing version 0.6.24 to 0.6.30
/* | ||
FlexSearch v0.6.24 | ||
FlexSearch v0.6.30 | ||
Copyright 2019 Nextapps GmbH | ||
@@ -8,25 +8,26 @@ Author: Thomas Wilkerling | ||
*/ | ||
'use strict';(function(x,L,N){let H;(H=N.define)&&H.amd?H([],function(){return L}):(H=N.modules)?H[x.toLowerCase()]=L:"object"===typeof exports?module.exports=L:N[x]=L})("FlexSearch",function(){function x(a,b){const c=b?b.id:a&&a.id;this.id=c||0===c?c:ja++;this.init(a,b);ca(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].f):Object.keys(this.f)});ca(this,"length",function(){return this.index.length})}function L(a){const b=D();for(const c in a)if(a.hasOwnProperty(c)){const d= | ||
a[c];F(d)?b[c]=d.slice(0):J(d)?b[c]=L(d):b[c]=d}return b}function N(a,b){const c=a.length,d=O(b),e=[];for(let k=0,f=0;k<c;k++){const h=a[k];if(d&&b(h)||!d&&!b[h])e[f++]=h}return e}function H(a,b,c,d,e,k,f,h,g,m){c=da(c,f?0:e,!1,!1,b,g,m);let n;h&&(h=c.page,n=c.next,c=c.result);if(f)a=this.where(f,null,e,c);else{a=c;b=this.g;c=a.length;e=Array(c);for(k=0;k<c;k++)e[k]=b[a[k]];a=e}c=a;d&&(O(d)||(I=d.split(":"),1<I.length?d=ka:(I=I[0],d=la)),c.sort(d));return c=P(h,n,c)}function ca(a,b,c){Object.defineProperty(a, | ||
b,{get:c})}function r(a){return new RegExp(a,"g")}function M(a,b){for(let c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}function S(a,b,c,d,e,k,f,h){if(b[c])return b[c];e=e?(h-(f||h/1.5))*k+(f||h/1.5)*e:k;b[c]=e;e>=f&&(a=a[h-(e+.5>>0)],a=a[c]||(a[c]=[]),a[a.length]=d);return e}function W(a,b){if(a){const c=Object.keys(a);for(let d=0,e=c.length;d<e;d++){const k=c[d],f=a[k];if(f)for(let h=0,g=f.length;h<g;h++)if(f[h]===b){1===g?delete a[k]:f.splice(h,1);break}else J(f[h])&&W(f[h],b)}}}function X(a){let b= | ||
"",c="";var d="";for(let e=0;e<a.length;e++){const k=a[e];if(k!==c)if(e&&"h"===k){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===c||"e"===c||"i"===c||"o"===c||"u"===c||"y"===c)&&d||" "===c)b+=k}else b+=k;d=e===a.length-1?"":a[e+1];c=k}return b}function ma(a,b){a=a.length-b.length;return 0>a?1:a?-1:0}function la(a,b){a=a[I];b=b[I];return a<b?-1:a>b?1:0}function ka(a,b){const c=I.length;for(let d=0;d<c;d++)a=a[I[d]],b=b[I[d]];return a<b?-1:a>b?1:0}function P(a,b,c){return a?{page:a, | ||
next:b?""+b:null,result:c}:c}function da(a,b,c,d,e,k,f){let h,g=[];if(!0===c){c="0";var m=""}else m=c&&c.split(":");const n=a.length;if(1<n){const w=D(),t=[];let u,z;var p=0,l;let E;var v=!0;let B,C=0,Y,Z,T,aa;m&&(2===m.length?(T=m,m=!1):m=aa=parseInt(m[0],10));if(f){for(u=D();p<n;p++)if("not"===e[p])for(z=a[p],E=z.length,l=0;l<E;l++)u["@"+z[l]]=1;else Z=p+1;if(Q(Z))return P(c,h,g);p=0}else Y=K(e)&&e;let U;for(;p<n;p++){const na=p===(Z||n)-1;if(!Y||!p)if((l=Y||e&&e[p])&&"and"!==l)if("or"===l)U=!1; | ||
else continue;else U=k=!0;z=a[p];if(E=z.length){if(v)if(B){var q=B.length;for(l=0;l<q;l++){v=B[l];var y="@"+v;f&&u[y]||(w[y]=1,k||(g[C++]=v))}B=null;v=!1}else{B=z;continue}y=!1;for(l=0;l<E;l++){q=z[l];var A="@"+q;const V=k?w[A]||0:p;if(!(!V&&!d||f&&u[A]||!k&&w[A]))if(V===p){if(na){if(!aa||--aa<C)if(g[C++]=q,b&&C===b)return P(c,C+(m||0),g)}else w[A]=p+1;y=!0}else d&&(A=t[V]||(t[V]=[]),A[A.length]=q)}if(U&&!y&&!d)break}else if(U&&!d)return P(c,h,z)}if(B)if(p=B.length,f)for(l=m?parseInt(m,10):0;l<p;l++)a= | ||
B[l],u["@"+a]||(g[C++]=a);else g=B;if(d)for(C=g.length,T?(p=parseInt(T[0],10)+1,l=parseInt(T[1],10)+1):(p=t.length,l=0);p--;)if(q=t[p]){for(E=q.length;l<E;l++)if(d=q[l],!f||!u["@"+d])if(g[C++]=d,b&&C===b)return P(c,p+":"+l,g);l=0}}else!n||e&&"not"===e[0]||(g=a[0],m&&(m=parseInt(m[0],10)));b&&(f=g.length,m&&m>f&&(m=0),m=m||0,h=m+b,h<f?g=g.slice(m,h):(h=0,m&&(g=g.slice(m))));return P(c,h,g)}function K(a){return"string"===typeof a}function F(a){return a.constructor===Array}function O(a){return"function"=== | ||
typeof a}function J(a){return"object"===typeof a}function Q(a){return"undefined"===typeof a}function ea(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=D();return b}function D(){return Object.create(null)}const G={encode:"icase",c:"forward",split:/\W+/,cache:!1,async:!1,u:!1,m:!1,a:!1,b:9,threshold:0,depth:0},fa={memory:{encode:"extra",c:"strict",threshold:0,b:1},speed:{encode:"icase",c:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",c:"full",threshold:1,b:3},score:{encode:"extra",c:"strict", | ||
'use strict';(function(x,L,O){let I;(I=O.define)&&I.amd?I([],function(){return L}):(I=O.modules)?I[x.toLowerCase()]=L:"object"===typeof exports?module.exports=L:O[x]=L})("FlexSearch",function(){function x(a,b){const c=b?b.id:a&&a.id;this.id=c||0===c?c:ja++;this.init(a,b);ca(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].f):Object.keys(this.f)});ca(this,"length",function(){return this.index.length})}function L(a){const b=B();for(const c in a)if(a.hasOwnProperty(c)){const d= | ||
a[c];E(d)?b[c]=d.slice(0):J(d)?b[c]=L(d):b[c]=d}return b}function O(a,b){const c=a.length,d=P(b),e=[];for(let h=0,f=0;h<c;h++){const k=a[h];if(d&&b(k)||!d&&!b[k])e[f++]=k}return e}function I(a,b,c,d,e,h,f,k,g,l){c=da(c,f?0:e,!1,!1,b,g,l);let p;k&&(k=c.page,p=c.next,c=c.result);if(f)a=this.where(f,null,e,c);else{a=c;b=this.j;c=a.length;e=Array(c);for(h=0;h<c;h++)e[h]=b[a[h]];a=e}c=a;d&&(P(d)||(K=d.split(":"),1<K.length?d=ka:(K=K[0],d=la)),c.sort(d));return c=Q(k,p,c)}function ca(a,b,c){Object.defineProperty(a, | ||
b,{get:c})}function r(a){return new RegExp(a,"g")}function M(a,b){for(let c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}function S(a,b,c,d,e,h,f,k){if(b[c])return b[c];e=e?(k-(f||k/1.5))*h+(f||k/1.5)*e:h;b[c]=e;e>=f&&(a=a[k-(e+.5>>0)],a=a[c]||(a[c]=[]),a[a.length]=d);return e}function W(a,b){if(a){const c=Object.keys(a);for(let d=0,e=c.length;d<e;d++){const h=c[d],f=a[h];if(f)for(let k=0,g=f.length;k<g;k++)if(f[k]===b){1===g?delete a[h]:f.splice(k,1);break}else J(f[k])&&W(f[k],b)}}}function X(a){let b= | ||
"",c="";var d="";for(let e=0;e<a.length;e++){const h=a[e];if(h!==c)if(e&&"h"===h){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===c||"e"===c||"i"===c||"o"===c||"u"===c||"y"===c)&&d||" "===c)b+=h}else b+=h;d=e===a.length-1?"":a[e+1];c=h}return b}function ma(a,b){a=a.length-b.length;return 0>a?1:a?-1:0}function la(a,b){a=a[K];b=b[K];return a<b?-1:a>b?1:0}function ka(a,b){const c=K.length;for(let d=0;d<c;d++)a=a[K[d]],b=b[K[d]];return a<b?-1:a>b?1:0}function Q(a,b,c){return a?{page:a, | ||
next:b?""+b:null,result:c}:c}function da(a,b,c,d,e,h,f){let k,g=[];if(!0===c){c="0";var l=""}else l=c&&c.split(":");const p=a.length;if(1<p){const w=B(),t=[];let v,z;var n=0,m;let F;var u=!0;let C,D=0,Y,Z,T,aa;l&&(2===l.length?(T=l,l=!1):l=aa=parseInt(l[0],10));if(f){for(v=B();n<p;n++)if("not"===e[n])for(z=a[n],F=z.length,m=0;m<F;m++)v["@"+z[m]]=1;else Z=n+1;if(N(Z))return Q(c,k,g);n=0}else Y=G(e)&&e;let U;for(;n<p;n++){const na=n===(Z||p)-1;if(!Y||!n)if((m=Y||e&&e[n])&&"and"!==m)if("or"===m)U=!1; | ||
else continue;else U=h=!0;z=a[n];if(F=z.length){if(u)if(C){var q=C.length;for(m=0;m<q;m++){u=C[m];var y="@"+u;f&&v[y]||(w[y]=1,h||(g[D++]=u))}C=null;u=!1}else{C=z;continue}y=!1;for(m=0;m<F;m++){q=z[m];var A="@"+q;const V=h?w[A]||0:n;if(!(!V&&!d||f&&v[A]||!h&&w[A]))if(V===n){if(na){if(!aa||--aa<D)if(g[D++]=q,b&&D===b)return Q(c,D+(l||0),g)}else w[A]=n+1;y=!0}else d&&(A=t[V]||(t[V]=[]),A[A.length]=q)}if(U&&!y&&!d)break}else if(U&&!d)return Q(c,k,z)}if(C)if(n=C.length,f)for(m=l?parseInt(l,10):0;m<n;m++)a= | ||
C[m],v["@"+a]||(g[D++]=a);else g=C;if(d)for(D=g.length,T?(n=parseInt(T[0],10)+1,m=parseInt(T[1],10)+1):(n=t.length,m=0);n--;)if(q=t[n]){for(F=q.length;m<F;m++)if(d=q[m],!f||!v["@"+d])if(g[D++]=d,b&&D===b)return Q(c,n+":"+m,g);m=0}}else!p||e&&"not"===e[0]||(g=a[0],l&&(l=parseInt(l[0],10)));b&&(f=g.length,l&&l>f&&(l=0),l=l||0,k=l+b,k<f?g=g.slice(l,k):(k=0,l&&(g=g.slice(l))));return Q(c,k,g)}function G(a){return"string"===typeof a}function E(a){return a.constructor===Array}function P(a){return"function"=== | ||
typeof a}function J(a){return"object"===typeof a}function N(a){return"undefined"===typeof a}function ea(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=B();return b}function B(){return Object.create(null)}const H={encode:"icase",c:"forward",split:/\W+/,cache:!1,async:!1,u:!1,m:!1,a:!1,b:9,threshold:0,depth:0},fa={memory:{encode:"extra",c:"strict",threshold:0,b:1},speed:{encode:"icase",c:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",c:"full",threshold:1,b:3},score:{encode:"extra",c:"strict", | ||
threshold:1,b:9,depth:4},balance:{encode:"balance",c:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",c:"strict",threshold:8,b:9,depth:1}},ba=[];let ja=0;const ha={},ia={};x.create=function(a,b){return new x(a,b)};x.registerMatcher=function(a){for(const b in a)a.hasOwnProperty(b)&&ba.push(r(b),a[b]);return this};x.registerEncoder=function(a,b){R[a]=b.bind(R);return this};x.registerLanguage=function(a,b){ha[a]=b.filter;ia[a]=b.stemmer;return this};x.encode=function(a,b){return R[a](b)};x.prototype.init= | ||
function(a,b){this.o=[];if(b){var c=b.preset;a=b}else a||(a=G),c=a.preset;b={};K(a)?(b=fa[a],a={}):c&&(b=fa[c]);this.c=a.tokenize||b.c||this.c||G.c;this.split=a.split||this.split||G.split;this.m=a.rtl||this.m||G.m;this.async="undefined"===typeof Promise||Q(c=a.async)?this.async||G.async:c;this.threshold=Q(c=a.threshold)?b.threshold||this.threshold||G.threshold:c;this.b=Q(c=a.resolution)?c=b.b||this.b||G.b:c;c<=this.threshold&&(this.b=this.threshold+1);this.depth="strict"!==this.c||Q(c=a.depth)?b.depth|| | ||
this.depth||G.depth:c;this.i=(c=Q(c=a.encode)?b.encode||G.encode:c)&&R[c]&&R[c].bind(R)||(O(c)?c:this.i||!1);(c=a.matcher)&&this.addMatcher(c);if(c=(b=a.lang)||a.filter){K(c)&&(c=ha[c]);if(F(c)){var d=this.i,e=D();for(var k=0;k<c.length;k++){const h=d?d(c[k]):c[k];e[h]=1}c=e}this.filter=c}if(c=b||a.stemmer){var f;b=K(c)?ia[c]:c;d=this.i;e=[];for(f in b)b.hasOwnProperty(f)&&(k=d?d(f):f,e.push(r(k+"($|\\W)"),d?d(b[f]):b[f]));this.stemmer=f=e}this.a=d=(c=a.doc)?L(c):this.a||G.a;this.l=ea(this.b-(this.threshold|| | ||
0));this.h=D();this.f=D();if(d&&(this.g=D(),a.doc=null,f=d.index={},c=d.keys=[],b=d.field,F(d.id)||(d.id=d.id.split(":")),b)){let h;F(b)||(J(b)?(h=b,d.field=b=Object.keys(b)):d.field=b=[b]);for(d=0;d<b.length;d++)e=b[d],F(e)||(h&&(a=h[e]),c[d]=e,b[d]=e.split(":")),f[e]=new x(a),f[e].g=this.g}return this};x.prototype.encode=function(a){a&&ba.length&&(a=M(a,ba));a&&this.o.length&&(a=M(a,this.o));a&&this.i&&(a=this.i(a));a&&this.stemmer&&(a=M(a,this.stemmer));return a};x.prototype.addMatcher=function(a){const b= | ||
this.o;for(const c in a)a.hasOwnProperty(c)&&b.push(r(c),a[c]);return this};x.prototype.add=function(a,b,c,d,e){if(this.a&&J(a))return this.j("add",a,b);if(b&&K(b)&&(a||0===a)){var k="@"+a;if(this.f[k]&&!d)return this.update(a,b);if(!e){if(this.async){let t=this;k=new Promise(function(u){setTimeout(function(){t.add(a,b,null,d,!0);t=null;u()})});if(c)k.then(c);else return k;return this}if(c)return this.add(a,b,null,d,!0),c(),this}b=this.encode(b);if(!b.length)return this;c=this.c;e=O(c)?c(b):b.split(this.split); | ||
this.filter&&(e=N(e,this.filter));const p=D();p._ctx=D();const l=e.length,v=this.threshold,q=this.depth,y=this.b,A=this.l,w=this.m;for(let t=0;t<l;t++){var f=e[t];if(f){var h=f.length,g=(w?t+1:l-t)/l,m="";switch(c){case "reverse":case "both":for(var n=h;--n;)m=f[n]+m,S(A,p,m,a,w?1:(h-n)/h,g,v,y-1);m="";case "forward":for(n=0;n<h;n++)m+=f[n],S(A,p,m,a,w?(n+1)/h:1,g,v,y-1);break;case "full":for(n=0;n<h;n++){const u=(w?n+1:h-n)/h;for(let z=h;z>n;z--)m=f.substring(n,z),S(A,p,m,a,u,g,v,y-1)}break;default:if(h= | ||
S(A,p,f,a,1,g,v,y-1),q&&1<l&&h>=v)for(h=p._ctx[f]||(p._ctx[f]=D()),f=this.h[f]||(this.h[f]=ea(y-(v||0))),g=t-q,m=t+q+1,0>g&&(g=0),m>l&&(m=l);g<m;g++)g!==t&&S(f,h,e[g],a,0,y-(g<t?t-g:g-t),v,y-1)}}}this.f[k]=1}return this};x.prototype.j=function(a,b,c){if(F(b))for(let g=0,m=b.length;g<m;g++){if(g===m-1)return this.j(a,b[g],c);this.j(a,b[g])}else{const g=this.a.index,m=this.a.keys;var d=this.a.tag,e=this.a.id;let n;let p;for(var k=0;k<e.length;k++)n=(n||b)[e[k]];if(d){for(e=0;e<d.length;e++){var f=d[e]; | ||
var h=f.split(":");for(k=0;k<h.length;k++)p=(p||b)[h[k]];p="@"+p}h=this.s[f];h=h[p]||(h[p]=[])}if("remove"===a){delete this.g[n];for(let l=0,v=m.length;l<v;l++){if(l===v-1)return g[m[l]].remove(n,c),this;g[m[l]].remove(n)}}e=this.a.field;h&&(h[h.length]=b);this.g[n]=b;for(let l=0,v=e.length;l<v;l++){d=e[l];let q;for(f=0;f<d.length;f++)q=(q||b)[d[f]];d=g[m[l]];f="add"===a?d.add:d.update;l===v-1?f.call(d,n,q,c):f.call(d,n,q)}}return this};x.prototype.update=function(a,b,c){if(this.a&&J(a))return this.j("update", | ||
a,b);this.f["@"+a]&&K(b)&&(this.remove(a),this.add(a,b,c,!0));return this};x.prototype.remove=function(a,b,c){if(this.a&&J(a))return this.j("remove",a,b);var d="@"+a;if(this.f[d]){if(!c){if(this.async&&"function"!==typeof importScripts){let e=this;d=new Promise(function(k){setTimeout(function(){e.remove(a,null,!0);e=null;k()})});if(b)d.then(b);else return d;return this}if(b)return this.remove(a,null,!0),b(),this}for(b=0;b<this.b-(this.threshold||0);b++)W(this.l[b],a);this.depth&&W(this.h,a);delete this.f[d]}return this}; | ||
let I;x.prototype.search=function(a,b,c,d){if(J(b)){if(F(b))for(var e=0;e<b.length;e++)b[e].query=a;else b.query=a;a=b;b=1E3}else b&&O(b)?(c=b,b=1E3):b||0===b||(b=1E3);let k=[],f=a;let h,g,m;if(J(a)&&!F(a)){c||(c=a.callback)&&(f.callback=null);g=a.sort;h=!1;b=a.limit;var n=a.threshold;m=!1;a=a.query}if(this.a){n=this.a.index;var p=f.bool||"or",l=f.field;let w=p;let t,u;if(l)F(l)||(l=[l]);else if(F(f)){var v=f;l=[];w=[];for(var q=0;q<f.length;q++)d=f[q],e=d.bool||p,l[q]=d.field,w[q]=e,"not"===e?t= | ||
!0:"and"===e&&(u=!0)}else l=this.a.keys;p=l.length;for(q=0;q<p;q++)v&&(f=v[q]),h&&!K(f)&&(f.page=null,f.limit=0),k[q]=n[l[q]].search(f,0);if(c)return c(H.call(this,a,w,k,g,b,m,!1,h,u,t));if(this.async){const z=this;return new Promise(function(E){Promise.all(k).then(function(B){E(H.call(z,a,w,B,g,b,m,!1,h,u,t))})})}return H.call(this,a,w,k,g,b,m,!1,h,u,t)}n||(n=this.threshold||0);if(!d){if(this.async&&"function"!==typeof importScripts){let w=this;n=new Promise(function(t){setTimeout(function(){t(w.search(f, | ||
b,null,!0));w=null})});if(c)n.then(c);else return n;return this}if(c)return c(this.search(f,b,null,!0)),this}if(!a||!K(a))return k;f=a;f=this.encode(f);if(!f.length)return k;c=this.c;c=O(c)?c(f):f.split(this.split);this.filter&&(c=N(c,this.filter));v=c.length;d=!0;e=[];const y=D();let A=0;1<v&&(this.depth&&"strict"===this.c?l=!0:c.sort(ma));if(!l||(p=this.h)){const w=this.b;for(;A<v;A++){let t=c[A];if(t){if(l){if(!q)if(p[t])q=t,y[t]=1;else if(!m)return k;if(m&&A===v-1&&!e.length)l=!1,t=q||t,y[t]= | ||
0;else if(!q)continue}if(!y[t]){const u=[];let z=!1,E=0;if(q=l?p[q]:this.l){let B;for(let C=0;C<w-n;C++)if(B=q[C]&&q[C][t])u[E++]=B,z=!0}if(z)q=t,e[e.length]=1<E?u.concat.apply([],u):u[0];else{d=!1;break}y[t]=1}}}}else d=!1;d&&(k=da(e,b,h,!1));return k};x.prototype.clear=function(){return this.destroy().init()};x.prototype.destroy=function(){this.l=this.h=this.f=null;if(this.a){const a=this.a.keys;for(let b=0;b<a.length;b++)this.a.index[a[b]].destroy();this.a=this.g=null}return this};const oa=function(){const a= | ||
r("\\s+"),b=r("[^a-z0-9 ]"),c=[r("[-/]")," ",b,"",a," "];return function(d){return X(M(d.toLowerCase(),c))}}(),R={icase:function(a){return a.toLowerCase()},simple:function(){const a=r("\\s+"),b=r("[^a-z0-9 ]"),c=r("[-/]"),d=r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=r("[\u00e8\u00e9\u00ea\u00eb]"),k=r("[\u00ec\u00ed\u00ee\u00ef]"),f=r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),h=r("[\u00f9\u00fa\u00fb\u00fc\u0171]"),g=r("[\u00fd\u0177\u00ff]"),m=r("\u00f1"),n=r("[\u00e7c]"),p=r("\u00df"),l=r(" & "), | ||
v=[d,"a",e,"e",k,"i",f,"o",h,"u",g,"y",m,"n",n,"k",p,"s",l," and ",c," ",b,"",a," "];return function(q){q=M(q.toLowerCase(),v);return" "===q?"":q}}(),advanced:function(){const a=r("ae"),b=r("ai"),c=r("ay"),d=r("ey"),e=r("oe"),k=r("ue"),f=r("ie"),h=r("sz"),g=r("zs"),m=r("ck"),n=r("cc"),p=r("sh"),l=r("th"),v=r("dt"),q=r("ph"),y=r("pf"),A=r("ou"),w=r("uo"),t=[a,"a",b,"ei",c,"ei",d,"ei",e,"o",k,"u",f,"i",h,"s",g,"s",p,"s",m,"k",n,"k",l,"t",v,"t",q,"f",y,"f",A,"o",w,"u"];return function(u,z){if(!u)return u; | ||
u=this.simple(u);2<u.length&&(u=M(u,t));z||1<u.length&&(u=X(u));return u}}(),extra:function(){const a=r("p"),b=r("z"),c=r("[cgq]"),d=r("n"),e=r("d"),k=r("[vw]"),f=r("[aeiouy]"),h=[a,"b",b,"s",c,"k",d,"m",e,"t",k,"f",f,""];return function(g){if(!g)return g;g=this.advanced(g,!0);if(1<g.length){g=g.split(" ");for(let m=0;m<g.length;m++){const n=g[m];1<n.length&&(g[m]=n[0]+M(n.substring(1),h))}g=g.join(" ");g=X(g)}return g}}(),balance:oa};return x}(!1),this); | ||
function(a,b){this.o=[];if(b){var c=b.preset;a=b}else a||(a=H),c=a.preset;b={};G(a)?(b=fa[a],a={}):c&&(b=fa[c]);this.c=a.tokenize||b.c||this.c||H.c;this.split=N(c=a.split)?this.split||H.split:G(c)?r(c):c;this.m=a.rtl||this.m||H.m;this.async="undefined"===typeof Promise||N(c=a.async)?this.async||H.async:c;this.threshold=N(c=a.threshold)?b.threshold||this.threshold||H.threshold:c;this.b=N(c=a.resolution)?c=b.b||this.b||H.b:c;c<=this.threshold&&(this.b=this.threshold+1);this.depth="strict"!==this.c|| | ||
N(c=a.depth)?b.depth||this.depth||H.depth:c;this.h=(c=N(c=a.encode)?b.encode||H.encode:c)&&R[c]&&R[c].bind(R)||(P(c)?c:this.h||!1);(c=a.matcher)&&this.addMatcher(c);if(c=(b=a.lang)||a.filter){G(c)&&(c=ha[c]);if(E(c)){var d=this.h,e=B();for(var h=0;h<c.length;h++){var f=d?d(c[h]):c[h];e[f]=1}c=e}this.filter=c}if(c=b||a.stemmer){var k;b=G(c)?ia[c]:c;d=this.h;e=[];for(k in b)b.hasOwnProperty(k)&&(h=d?d(k):k,e.push(r(h+"($|\\W)"),d?d(b[k]):b[k]));this.stemmer=k=e}this.a=e=(c=a.doc)?L(c):this.a||H.a;this.l= | ||
ea(this.b-(this.threshold||0));this.g=B();this.f=B();if(e){this.j=B();a.doc=null;k=e.index={};b=e.keys=[];d=e.field;h=e.store;E(e.id)||(e.id=e.id.split(":"));if(h){f=B();if(G(h))f[h]=1;else if(E(h))for(let g=0;g<h.length;g++)f[h[g]]=1;else J(h)&&(f=h);e.store=f}if(d){let g;E(d)||(J(d)?(g=d,e.field=d=Object.keys(d)):e.field=d=[d]);for(e=0;e<d.length;e++)h=d[e],E(h)||(g&&(a=g[h]),b[e]=h,d[e]=h.split(":")),k[h]=new x(a)}a.doc=c}return this};x.prototype.encode=function(a){a&&(ba.length&&(a=M(a,ba)),this.o.length&& | ||
(a=M(a,this.o)),this.h&&(a=this.h(a)),this.stemmer&&(a=M(a,this.stemmer)));return a};x.prototype.addMatcher=function(a){const b=this.o;for(const c in a)a.hasOwnProperty(c)&&b.push(r(c),a[c]);return this};x.prototype.add=function(a,b,c,d,e){if(this.a&&J(a))return this.i("add",a,b);if(b&&G(b)&&(a||0===a)){var h="@"+a;if(this.f[h]&&!d)return this.update(a,b);if(!e){if(this.async){let t=this;h=new Promise(function(v){setTimeout(function(){t.add(a,b,null,d,!0);t=null;v()})});if(c)h.then(c);else return h; | ||
return this}if(c)return this.add(a,b,null,d,!0),c(),this}b=this.encode(b);if(!b.length)return this;c=this.c;e=P(c)?c(b):b.split(this.split);this.filter&&(e=O(e,this.filter));const n=B();n._ctx=B();const m=e.length,u=this.threshold,q=this.depth,y=this.b,A=this.l,w=this.m;for(let t=0;t<m;t++){var f=e[t];if(f){var k=f.length,g=(w?t+1:m-t)/m,l="";switch(c){case "reverse":case "both":for(var p=k;--p;)l=f[p]+l,S(A,n,l,a,w?1:(k-p)/k,g,u,y-1);l="";case "forward":for(p=0;p<k;p++)l+=f[p],S(A,n,l,a,w?(p+1)/ | ||
k:1,g,u,y-1);break;case "full":for(p=0;p<k;p++){const v=(w?p+1:k-p)/k;for(let z=k;z>p;z--)l=f.substring(p,z),S(A,n,l,a,v,g,u,y-1)}break;default:if(k=S(A,n,f,a,1,g,u,y-1),q&&1<m&&k>=u)for(k=n._ctx[f]||(n._ctx[f]=B()),f=this.g[f]||(this.g[f]=ea(y-(u||0))),g=t-q,l=t+q+1,0>g&&(g=0),l>m&&(l=m);g<l;g++)g!==t&&S(f,k,e[g],a,0,y-(g<t?t-g:g-t),u,y-1)}}}this.f[h]=1}return this};x.prototype.i=function(a,b,c){if(E(b)){var d=b.length;if(d--){for(var e=0;e<d;e++)this.i(a,b[e]);return this.i(a,b[d],c)}}else{var h= | ||
this.a.index,f=this.a.keys,k=this.a.tag;e=this.a.store;var g;var l=this.a.id;d=b;for(var p=0;p<l.length;p++)d=d[l[p]];if("remove"===a&&(delete this.j[d],l=f.length,l--)){for(b=0;b<l;b++)h[f[b]].remove(d);return h[f[l]].remove(d,c)}if(k){for(g=0;g<k.length;g++){var n=k[g];var m=b;l=n.split(":");for(p=0;p<l.length;p++)m=m[l[p]];m="@"+m}g=this.s[n];g=g[m]||(g[m]=[])}l=this.a.field;for(let u=0,q=l.length;u<q;u++){n=l[u];k=b;for(m=0;m<n.length;m++)k=k[n[m]];n=h[f[u]];m="add"===a?n.add:n.update;u===q-1? | ||
m.call(n,d,k,c):m.call(n,d,k)}if(e){c=Object.keys(e);a=B();for(h=0;h<c.length;h++)if(f=c[h],e[f]){f=f.split(":");let u,q;for(l=0;l<f.length;l++)k=f[l],q=(q||b)[k],u=(u||a)[k]=q}b=a}g&&(g[g.length]=b);this.j[d]=b}return this};x.prototype.update=function(a,b,c){if(this.a&&J(a))return this.i("update",a,b);this.f["@"+a]&&G(b)&&(this.remove(a),this.add(a,b,c,!0));return this};x.prototype.remove=function(a,b,c){if(this.a&&J(a))return this.i("remove",a,b);var d="@"+a;if(this.f[d]){if(!c){if(this.async&& | ||
"function"!==typeof importScripts){let e=this;d=new Promise(function(h){setTimeout(function(){e.remove(a,null,!0);e=null;h()})});if(b)d.then(b);else return d;return this}if(b)return this.remove(a,null,!0),b(),this}for(b=0;b<this.b-(this.threshold||0);b++)W(this.l[b],a);this.depth&&W(this.g,a);delete this.f[d]}return this};let K;x.prototype.search=function(a,b,c,d){if(J(b)){if(E(b))for(var e=0;e<b.length;e++)b[e].query=a;else b.query=a;a=b;b=1E3}else b&&P(b)?(c=b,b=1E3):b||0===b||(b=1E3);let h=[], | ||
f=a;let k,g,l;if(J(a)&&!E(a)){c||(c=a.callback)&&(f.callback=null);g=a.sort;k=!1;b=a.limit;var p=a.threshold;l=!1;a=a.query}if(this.a){p=this.a.index;var n=f.bool||"or",m=f.field;let w=n;let t,v;if(m)E(m)||(m=[m]);else if(E(f)){var u=f;m=[];w=[];for(var q=0;q<f.length;q++)d=f[q],e=d.bool||n,m[q]=d.field,w[q]=e,"not"===e?t=!0:"and"===e&&(v=!0)}else m=this.a.keys;n=m.length;for(q=0;q<n;q++)u&&(f=u[q]),k&&!G(f)&&(f.page=null,f.limit=0),h[q]=p[m[q]].search(f,0);if(c)return c(I.call(this,a,w,h,g,b,l,!1, | ||
k,v,t));if(this.async){const z=this;return new Promise(function(F){Promise.all(h).then(function(C){F(I.call(z,a,w,C,g,b,l,!1,k,v,t))})})}return I.call(this,a,w,h,g,b,l,!1,k,v,t)}p||(p=this.threshold||0);if(!d){if(this.async&&"function"!==typeof importScripts){let w=this;p=new Promise(function(t){setTimeout(function(){t(w.search(f,b,null,!0));w=null})});if(c)p.then(c);else return p;return this}if(c)return c(this.search(f,b,null,!0)),this}if(!a||!G(a))return h;f=a;f=this.encode(f);if(!f.length)return h; | ||
c=this.c;c=P(c)?c(f):f.split(this.split);this.filter&&(c=O(c,this.filter));u=c.length;d=!0;e=[];const y=B();let A=0;1<u&&(this.depth&&"strict"===this.c?m=!0:c.sort(ma));if(!m||(n=this.g)){const w=this.b;for(;A<u;A++){let t=c[A];if(t){if(m){if(!q)if(n[t])q=t,y[t]=1;else if(!l)return h;if(l&&A===u-1&&!e.length)m=!1,t=q||t,y[t]=0;else if(!q)continue}if(!y[t]){const v=[];let z=!1,F=0;if(q=m?n[q]:this.l){let C;for(let D=0;D<w-p;D++)if(C=q[D]&&q[D][t])v[F++]=C,z=!0}if(z)q=t,e[e.length]=1<F?v.concat.apply([], | ||
v):v[0];else{d=!1;break}y[t]=1}}}}else d=!1;d&&(h=da(e,b,k,!1));return h};x.prototype.clear=function(){return this.destroy().init()};x.prototype.destroy=function(){this.l=this.g=this.f=null;if(this.a){const a=this.a.keys;for(let b=0;b<a.length;b++)this.a.index[a[b]].destroy();this.a=this.j=null}return this};const oa=function(){const a=r("\\s+"),b=r("[^a-z0-9 ]"),c=[r("[-/]")," ",b,"",a," "];return function(d){return X(M(d.toLowerCase(),c))}}(),R={icase:function(a){return a.toLowerCase()},simple:function(){const a= | ||
r("\\s+"),b=r("[^a-z0-9 ]"),c=r("[-/]"),d=r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=r("[\u00e8\u00e9\u00ea\u00eb]"),h=r("[\u00ec\u00ed\u00ee\u00ef]"),f=r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),k=r("[\u00f9\u00fa\u00fb\u00fc\u0171]"),g=r("[\u00fd\u0177\u00ff]"),l=r("\u00f1"),p=r("[\u00e7c]"),n=r("\u00df"),m=r(" & "),u=[d,"a",e,"e",h,"i",f,"o",k,"u",g,"y",l,"n",p,"k",n,"s",m," and ",c," ",b,"",a," "];return function(q){q=M(q.toLowerCase(),u);return" "===q?"":q}}(),advanced:function(){const a= | ||
r("ae"),b=r("ai"),c=r("ay"),d=r("ey"),e=r("oe"),h=r("ue"),f=r("ie"),k=r("sz"),g=r("zs"),l=r("ck"),p=r("cc"),n=r("sh"),m=r("th"),u=r("dt"),q=r("ph"),y=r("pf"),A=r("ou"),w=r("uo"),t=[a,"a",b,"ei",c,"ei",d,"ei",e,"o",h,"u",f,"i",k,"s",g,"s",n,"s",l,"k",p,"k",m,"t",u,"t",q,"f",y,"f",A,"o",w,"u"];return function(v,z){if(!v)return v;v=this.simple(v);2<v.length&&(v=M(v,t));z||1<v.length&&(v=X(v));return v}}(),extra:function(){const a=r("p"),b=r("z"),c=r("[cgq]"),d=r("n"),e=r("d"),h=r("[vw]"),f=r("[aeiouy]"), | ||
k=[a,"b",b,"s",c,"k",d,"m",e,"t",h,"f",f,""];return function(g){if(!g)return g;g=this.advanced(g,!0);if(1<g.length){g=g.split(" ");for(let l=0;l<g.length;l++){const p=g[l];1<p.length&&(g[l]=p[0]+M(p.substring(1),k))}g=g.join(" ");g=X(g)}return g}}(),balance:oa};return x}(!1),this); |
/* | ||
FlexSearch v0.6.24 | ||
FlexSearch v0.6.30 | ||
Copyright 2019 Nextapps GmbH | ||
@@ -8,45 +8,45 @@ Author: Thomas Wilkerling | ||
*/ | ||
'use strict';function ma(n){var t=0;return function(){return t<n.length?{done:!1,value:n[t++]}:{done:!0}}}var na="function"==typeof Object.defineProperties?Object.defineProperty:function(n,t,p){n!=Array.prototype&&n!=Object.prototype&&(n[t]=p.value)},Z="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function pa(){pa=function(){};Z.Symbol||(Z.Symbol=qa)}function ra(n,t){this.b=n;na(this,"description",{configurable:!0,writable:!0,value:t})} | ||
ra.prototype.toString=function(){return this.b};var qa=function(){function n(p){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return new ra("jscomp_symbol_"+(p||"")+"_"+t++,p)}var t=0;return n}();function sa(){pa();var n=Z.Symbol.iterator;n||(n=Z.Symbol.iterator=Z.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[n]&&na(Array.prototype,n,{configurable:!0,writable:!0,value:function(){return ta(ma(this))}});sa=function(){}} | ||
function ta(n){sa();n={next:n};n[Z.Symbol.iterator]=function(){return this};return n}function za(n,t){sa();n instanceof String&&(n+="");var p=0,E={next:function(){if(p<n.length){var K=p++;return{value:t(K,n[K]),done:!1}}E.next=function(){return{done:!0,value:void 0}};return E.next()}};E[Symbol.iterator]=function(){return E};return E} | ||
function Aa(n,t){if(t){var p=Z;n=n.split(".");for(var E=0;E<n.length-1;E++){var K=n[E];K in p||(p[K]={});p=p[K]}n=n[n.length-1];E=p[n];t=t(E);t!=E&&null!=t&&na(p,n,{configurable:!0,writable:!0,value:t})}}Aa("Array.prototype.keys",function(n){return n?n:function(){return za(this,function(t){return t})}});function Ba(n){var t="undefined"!=typeof Symbol&&Symbol.iterator&&n[Symbol.iterator];return t?t.call(n):{next:ma(n)}} | ||
Aa("Promise",function(n){function t(m){this.h=0;this.m=void 0;this.b=[];var w=this.j();try{m(w.resolve,w.reject)}catch(l){w.reject(l)}}function p(){this.b=null}function E(m){return m instanceof t?m:new t(function(w){w(m)})}if(n)return n;p.prototype.h=function(m){if(null==this.b){this.b=[];var w=this;this.j(function(){w.m()})}this.b.push(m)};var K=Z.setTimeout;p.prototype.j=function(m){K(m,0)};p.prototype.m=function(){for(;this.b&&this.b.length;){var m=this.b;this.b=[];for(var w=0;w<m.length;++w){var l= | ||
m[w];m[w]=null;try{l()}catch(F){this.l(F)}}}this.b=null};p.prototype.l=function(m){this.j(function(){throw m;})};t.prototype.j=function(){function m(F){return function(H){l||(l=!0,F.call(w,H))}}var w=this,l=!1;return{resolve:m(this.L),reject:m(this.l)}};t.prototype.L=function(m){if(m===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(m instanceof t)this.M(m);else{a:switch(typeof m){case "object":var w=null!=m;break a;case "function":w=!0;break a;default:w=!1}w?this.K(m):this.w(m)}}; | ||
t.prototype.K=function(m){var w=void 0;try{w=m.then}catch(l){this.l(l);return}"function"==typeof w?this.N(w,m):this.w(m)};t.prototype.l=function(m){this.B(2,m)};t.prototype.w=function(m){this.B(1,m)};t.prototype.B=function(m,w){if(0!=this.h)throw Error("Cannot settle("+m+", "+w+"): Promise already settled in state"+this.h);this.h=m;this.m=w;this.I()};t.prototype.I=function(){if(null!=this.b){for(var m=0;m<this.b.length;++m)ba.h(this.b[m]);this.b=null}};var ba=new p;t.prototype.M=function(m){var w= | ||
this.j();m.F(w.resolve,w.reject)};t.prototype.N=function(m,w){var l=this.j();try{m.call(w,l.resolve,l.reject)}catch(F){l.reject(F)}};t.prototype.then=function(m,w){function l(L,V){return"function"==typeof L?function(ja){try{F(L(ja))}catch(ka){H(ka)}}:V}var F,H,ca=new t(function(L,V){F=L;H=V});this.F(l(m,F),l(w,H));return ca};t.prototype.catch=function(m){return this.then(void 0,m)};t.prototype.F=function(m,w){function l(){switch(F.h){case 1:m(F.m);break;case 2:w(F.m);break;default:throw Error("Unexpected state: "+ | ||
F.h);}}var F=this;null==this.b?ba.h(l):this.b.push(l)};t.resolve=E;t.reject=function(m){return new t(function(w,l){l(m)})};t.race=function(m){return new t(function(w,l){for(var F=Ba(m),H=F.next();!H.done;H=F.next())E(H.value).F(w,l)})};t.all=function(m){var w=Ba(m),l=w.next();return l.done?E([]):new t(function(F,H){function ca(ja){return function(ka){L[ja]=ka;V--;0==V&&F(L)}}var L=[],V=0;do L.push(void 0),V++,E(l.value).F(ca(L.length-1),H),l=w.next();while(!l.done)})};return t}); | ||
(function(n,t,p){var E;(E=p.define)&&E.amd?E([],function(){return t}):(E=p.modules)?E[n.toLowerCase()]=t:"object"===typeof exports?module.exports=t:p[n]=t})("FlexSearch",function Ca(n){function p(a,c){var b=c?c.id:a&&a.id;this.id=b||0===b?b:Da++;this.init(a,c);w(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].f):Object.keys(this.f)});w(this,"length",function(){return this.index.length})}function E(a,c,b,d){this.D!==this.i&&(this.A=this.A.concat(b),this.D++,d&&this.A.length>= | ||
d&&(this.D=this.i),this.D===this.i&&(this.cache&&this.v.set(c,this.A),this.H&&this.H(this.A)));return this}function K(a){var c=G(),b;for(b in a)if(a.hasOwnProperty(b)){var d=a[b];O(d)?c[b]=d.slice(0):Q(d)?c[b]=K(d):c[b]=d}return c}function ba(a,c){for(var b=a.length,d=da(c),e=[],f=0,g=0;f<b;f++){var k=a[f];if(d&&c(k)||!d&&!c[k])e[g++]=k}return e}function m(a,c,b,d,e,f,g,k,h,q){b=ua(b,g?0:e,k,f,c,h,q);if(k){k=b.page;var y=b.next;b=b.result}if(g)c=this.where(g,null,e,b);else{c=b;b=this.s;e=c.length; | ||
f=Array(e);for(g=0;g<e;g++)f[g]=b[c[g]];c=f}b=c;d&&(da(d)||(W=d.split(":"),1<W.length?d=ka:(W=W[0],d=ja)),b.sort(d));b=fa(k,y,b);this.cache&&this.v.set(a,b);return b}function w(a,c,b){Object.defineProperty(a,c,{get:b})}function l(a){return new RegExp(a,"g")}function F(a,c){for(var b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a}function H(a,c,b,d,e,f,g,k){if(c[b])return c[b];e=e?(k-(g||k/1.5))*f+(g||k/1.5)*e:f;c[b]=e;e>=g&&(a=a[k-(e+.5>>0)],a=a[b]||(a[b]=[]),a[a.length]=d);return e}function ca(a, | ||
c){if(a)for(var b=Object.keys(a),d=0,e=b.length;d<e;d++){var f=b[d],g=a[f];if(g)for(var k=0,h=g.length;k<h;k++)if(g[k]===c){1===h?delete a[f]:g.splice(k,1);break}else Q(g[k])&&ca(g[k],c)}}function L(a){for(var c="",b="",d="",e=0;e<a.length;e++){var f=a[e];if(f!==b)if(e&&"h"===f){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===b||"e"===b||"i"===b||"o"===b||"u"===b||"y"===b)&&d||" "===b)c+=f}else c+=f;d=e===a.length-1?"":a[e+1];b=f}return c}function V(a,c){a=a.length-c.length;return 0> | ||
a?1:a?-1:0}function ja(a,c){a=a[W];c=c[W];return a<c?-1:a>c?1:0}function ka(a,c){for(var b=W.length,d=0;d<b;d++)a=a[W[d]],c=c[W[d]];return a<c?-1:a>c?1:0}function fa(a,c,b){return a?{page:a,next:c?""+c:null,result:b}:b}function ua(a,c,b,d,e,f,g){var k=[];if(!0===b){b="0";var h=""}else h=b&&b.split(":");var q=a.length;if(1<q){var y=G(),v=[],A,u=0,r,D=!0,B=0,C;if(h)if(2===h.length){var z=h;h=!1}else h=C=parseInt(h[0],10);if(g){for(A=G();u<q;u++)if("not"===e[u]){var x=a[u];var J=x.length;for(r=0;r<J;r++)A["@"+ | ||
x[r]]=1}else var R=u+1;if(I(R))return fa(b,S,k);u=0}else var Y=X(e)&&e;for(var ha;u<q;u++){var M=u===(R||q)-1;if(!Y||!u)if((r=Y||e&&e[u])&&"and"!==r)if("or"===r)ha=!1;else continue;else ha=f=!0;x=a[u];if(J=x.length){if(D)if(T){var N=T.length;for(r=0;r<N;r++){D=T[r];var aa="@"+D;g&&A[aa]||(y[aa]=1,f||(k[B++]=D))}var T=null;D=!1}else{T=x;continue}aa=!1;for(r=0;r<J;r++){N=x[r];var U="@"+N,ea=f?y[U]||0:u;if(!(!ea&&!d||g&&A[U]||!f&&y[U]))if(ea===u){if(M){if(!C||--C<B)if(k[B++]=N,c&&B===c)return fa(b,B+ | ||
(h||0),k)}else y[U]=u+1;aa=!0}else d&&(U=v[ea]||(v[ea]=[]),U[U.length]=N)}if(ha&&!aa&&!d)break}else if(ha&&!d)return fa(b,S,x)}if(T)if(u=T.length,g)for(r=h?parseInt(h,10):0;r<u;r++)a=T[r],A["@"+a]||(k[B++]=a);else k=T;if(d)for(B=k.length,z?(u=parseInt(z[0],10)+1,r=parseInt(z[1],10)+1):(u=v.length,r=0);u--;)if(N=v[u]){for(J=N.length;r<J;r++)if(d=N[r],!g||!A["@"+d])if(k[B++]=d,c&&B===c)return fa(b,u+":"+r,k);r=0}}else!q||e&&"not"===e[0]||(k=a[0],h&&(h=parseInt(h[0],10)));if(c){g=k.length;h&&h>g&&(h= | ||
0);h=h||0;var S=h+c;S<g?k=k.slice(h,S):(S=0,h&&(k=k.slice(h)))}return fa(b,S,k)}function X(a){return"string"===typeof a}function O(a){return a.constructor===Array}function da(a){return"function"===typeof a}function Q(a){return"object"===typeof a}function I(a){return"undefined"===typeof a}function va(a){for(var c=Array(a),b=0;b<a;b++)c[b]=G();return c}function G(){return Object.create(null)}function Ea(){var a,c;self.onmessage=function(b){if(b=b.data)if(b.search){var d=c.search(b.content,b.threshold? | ||
{limit:b.limit,threshold:b.threshold,where:b.where}:b.limit);self.postMessage({id:a,content:b.content,limit:b.limit,result:d})}else b.add?c.add(b.id,b.content):b.update?c.update(b.id,b.content):b.remove?c.remove(b.id):b.clear?c.clear():b.info?(b=c.info(),b.worker=a,console.log(b)):b.register&&(a=b.id,b.options.cache=!1,b.options.async=!1,b.options.worker=!1,c=(new Function(b.register.substring(b.register.indexOf("{")+1,b.register.lastIndexOf("}"))))(),c=new c(b.options))}}function Fa(a,c,b,d){a=n("flexsearch", | ||
"id"+a,Ea,function(f){(f=f.data)&&f.result&&d(f.id,f.content,f.result,f.limit,f.where,f.cursor,f.suggest)},c);var e=Ca.toString();b.id=c;a.postMessage({register:e,options:b,id:c});return a}var P={encode:"icase",g:"forward",split:/\W+/,cache:!1,async:!1,i:!1,G:!1,a:!1,c:9,threshold:0,depth:0},wa={memory:{encode:"extra",g:"strict",threshold:0,c:1},speed:{encode:"icase",g:"strict",threshold:1,c:3,depth:2},match:{encode:"extra",g:"full",threshold:1,c:3},score:{encode:"extra",g:"strict",threshold:1,c:9, | ||
depth:4},balance:{encode:"balance",g:"strict",threshold:0,c:3,depth:3},fast:{encode:"icase",g:"strict",threshold:8,c:9,depth:1}},la=[],Da=0,xa={},ya={};p.create=function(a,c){return new p(a,c)};p.registerMatcher=function(a){for(var c in a)a.hasOwnProperty(c)&&la.push(l(c),a[c]);return this};p.registerEncoder=function(a,c){ia[a]=c.bind(ia);return this};p.registerLanguage=function(a,c){xa[a]=c.filter;ya[a]=c.stemmer;return this};p.encode=function(a,c){return ia[a](c)};p.prototype.init=function(a,c){this.h= | ||
[];if(c){var b=c.preset;a=c}else a||(a=P),b=a.preset;c={};X(a)?((c=wa[a])||console.warn("Preset not found: "+a),a={}):b&&((c=wa[b])||console.warn("Preset not found: "+b));if(b=a.worker)if("undefined"===typeof Worker)a.worker=!1,this.b=null;else{var d=parseInt(b,10)||4;this.w=-1;this.D=0;this.A=[];this.H=null;this.b=Array(d);for(var e=0;e<d;e++)this.b[e]=Fa(this.id,e,a,E.bind(this))}this.g=a.tokenize||c.g||this.g||P.g;this.split=a.split||this.split||P.split;this.G=a.rtl||this.G||P.G;this.async="undefined"=== | ||
typeof Promise||I(b=a.async)?this.async||P.async:b;this.i=I(b=a.worker)?this.i||P.i:b;this.threshold=I(b=a.threshold)?c.threshold||this.threshold||P.threshold:b;this.c=I(b=a.resolution)?b=c.c||this.c||P.c:b;b<=this.threshold&&(this.c=this.threshold+1);this.depth="strict"!==this.g||I(b=a.depth)?c.depth||this.depth||P.depth:b;this.j=(b=I(b=a.encode)?c.encode||P.encode:b)&&ia[b]&&ia[b].bind(ia)||(da(b)?b:this.j||!1);(b=a.matcher)&&this.addMatcher(b);if(b=(c=a.lang)||a.filter){X(b)&&(b=xa[b]);if(O(b)){d= | ||
this.j;e=G();for(var f=0;f<b.length;f++){var g=d?d(b[f]):b[f];e[g]=1}b=e}this.filter=b}if(b=c||a.stemmer){c=X(b)?ya[b]:b;d=this.j;e=[];for(var k in c)c.hasOwnProperty(k)&&(f=d?d(k):k,e.push(l(f+"($|\\W)"),d?d(c[k]):c[k]));this.stemmer=e}this.a=e=(b=a.doc)?K(b):this.a||P.a;this.u=va(this.c-(this.threshold||0));this.o=G();this.f=G();if(e){this.s=G();a.doc=null;k=e.index={};c=e.keys=[];d=e.field;f=e.tag;O(e.id)||(e.id=e.id.split(":"));if(f){this.B=G();g=G();if(d)if(X(d))g[d]=a;else if(O(d))for(var h= | ||
0;h<d.length;h++)g[d[h]]=a;else Q(d)&&(g=d);O(f)||(e.tag=f=[f]);for(d=0;d<f.length;d++)this.B[f[d]]=G();this.I=f;d=g}if(d){if(!O(d))if(Q(d)){var q=d;e.field=d=Object.keys(d)}else e.field=d=[d];for(e=0;e<d.length;e++)f=d[e],O(f)||(q&&(a=q[f]),c[e]=f,d[e]=f.split(":")),k[f]=new p(a),k[f].s=this.s}}this.m=!0;this.v=(this.cache=b=I(b=a.cache)?this.cache||P.cache:b)?new Ga(b):!1;return this};p.prototype.encode=function(a){a&&la.length&&(a=F(a,la));a&&this.h.length&&(a=F(a,this.h));a&&this.j&&(a=this.j(a)); | ||
a&&this.stemmer&&(a=F(a,this.stemmer));return a};p.prototype.addMatcher=function(a){var c=this.h,b;for(b in a)a.hasOwnProperty(b)&&c.push(l(b),a[b]);return this};p.prototype.add=function(a,c,b,d,e){if(this.a&&Q(a))return this.l("add",a,c);if(c&&X(c)&&(a||0===a)){var f="@"+a;if(this.f[f]&&!d)return this.update(a,c);if(this.i)return++this.w>=this.b.length&&(this.w=0),this.b[this.w].postMessage({add:!0,id:a,content:c}),this.f[f]=""+this.w,b&&b(),this;if(!e){if(this.async&&"function"!==typeof importScripts){var g= | ||
this;f=new Promise(function(Y){setTimeout(function(){g.add(a,c,null,d,!0);g=null;Y()})});if(b)f.then(b);else return f;return this}if(b)return this.add(a,c,null,d,!0),b(),this}c=this.encode(c);if(!c.length)return this;b=this.g;e=da(b)?b(c):c.split(this.split);this.filter&&(e=ba(e,this.filter));var k=G();k._ctx=G();for(var h=e.length,q=this.threshold,y=this.depth,v=this.c,A=this.u,u=this.G,r=0;r<h;r++){var D=e[r];if(D){var B=D.length,C=(u?r+1:h-r)/h,z="";switch(b){case "reverse":case "both":for(var x= | ||
B;--x;)z=D[x]+z,H(A,k,z,a,u?1:(B-x)/B,C,q,v-1);z="";case "forward":for(x=0;x<B;x++)z+=D[x],H(A,k,z,a,u?(x+1)/B:1,C,q,v-1);break;case "full":for(x=0;x<B;x++)for(var J=(u?x+1:B-x)/B,R=B;R>x;R--)z=D.substring(x,R),H(A,k,z,a,J,C,q,v-1);break;default:if(B=H(A,k,D,a,1,C,q,v-1),y&&1<h&&B>=q)for(B=k._ctx[D]||(k._ctx[D]=G()),D=this.o[D]||(this.o[D]=va(v-(q||0))),C=r-y,z=r+y+1,0>C&&(C=0),z>h&&(z=h);C<z;C++)C!==r&&H(D,B,e[C],a,0,v-(C<r?r-C:C-r),q,v-1)}}}this.f[f]=1;this.m=!1}return this};p.prototype.l=function(a, | ||
c,b){if(O(c))for(var d=0,e=c.length;d<e;d++){if(d===e-1)return this.l(a,c[d],b);this.l(a,c[d])}else{d=this.a.index;e=this.a.keys;for(var f=this.a.tag,g=this.a.id,k,h,q,y,v=0;v<g.length;v++)k=(k||c)[g[v]];if(f){for(g=0;g<f.length;g++){q=f[g];h=q.split(":");for(v=0;v<h.length;v++)y=(y||c)[h[v]];y="@"+y}h=this.B[q];h=h[y]||(h[y]=[])}if("remove"===a)for(delete this.s[k],g=0,f=e.length;g<f;g++){if(g===f-1)return d[e[g]].remove(k,b),this;d[e[g]].remove(k)}g=this.a.field;h&&(h[h.length]=c);this.s[k]=c;f= | ||
0;for(q=g.length;f<q;f++){h=g[f];y=void 0;for(v=0;v<h.length;v++)y=(y||c)[h[v]];h=d[e[f]];v="add"===a?h.add:h.update;f===q-1?v.call(h,k,y,b):v.call(h,k,y)}}return this};p.prototype.update=function(a,c,b){if(this.a&&Q(a))return this.l("update",a,c);this.f["@"+a]&&X(c)&&(this.remove(a),this.add(a,c,b,!0));return this};p.prototype.remove=function(a,c,b){if(this.a&&Q(a))return this.l("remove",a,c);var d="@"+a;if(this.f[d]){if(this.i)return this.b[this.f[d]].postMessage({remove:!0,id:a}),delete this.f[d], | ||
c&&c(),this;if(!b){if(this.async&&"function"!==typeof importScripts){var e=this;d=new Promise(function(f){setTimeout(function(){e.remove(a,null,!0);e=null;f()})});if(c)d.then(c);else return d;return this}if(c)return this.remove(a,null,!0),c(),this}for(c=0;c<this.c-(this.threshold||0);c++)ca(this.u[c],a);this.depth&&ca(this.o,a);delete this.f[d];this.m=!1}return this};var W;p.prototype.search=function(a,c,b,d){if(Q(c)){if(O(c))for(var e=0;e<c.length;e++)c[e].query=a;else c.query=a;a=c;c=1E3}else c&& | ||
da(c)?(b=c,c=1E3):c||0===c||(c=1E3);var f=[],g=a;if(Q(a)&&!O(a)){b||(b=a.callback)&&(g.callback=null);var k=a.sort;var h=a.page;c=a.limit;var q=a.threshold;var y=a.suggest;a=a.query}if(this.a){q=this.a.index;var v=g.where,A=g.bool||"or",u=g.field,r=A,D,B;if(u)O(u)||(u=[u]);else if(O(g)){var C=g;u=[];r=[];for(var z=0;z<g.length;z++)d=g[z],e=d.bool||A,u[z]=d.field,r[z]=e,"not"===e?D=!0:"and"===e&&(B=!0)}else u=this.a.keys;A=u.length;for(z=0;z<A;z++)C&&(g=C[z]),h&&!X(g)&&(g.page=null,g.limit=0),f[z]= | ||
q[u[z]].search(g,0);if(b)return b(m.call(this,a,r,f,k,c,y,v,h,B,D));if(this.async){var x=this;return new Promise(function(oa){Promise.all(f).then(function(Ha){oa(m.call(x,a,r,Ha,k,c,y,v,h,B,D))})})}return m.call(this,a,r,f,k,c,y,v,h,B,D)}q||(q=this.threshold||0);if(this.i)for(this.H=b,this.D=0,this.A=[],q=0;q<this.i;q++)this.b[q].postMessage({search:!0,limit:c,content:g});else{if(!d){if(this.async&&"function"!==typeof importScripts){var J=this;q=new Promise(function(oa){setTimeout(function(){oa(J.search(g, | ||
c,null,!0));J=null})});if(b)q.then(b);else return q;return this}if(b)return b(this.search(g,c,null,!0)),this}if(!a||!X(a))return f;g=a;if(this.cache)if(this.m){if(b=this.v.get(a))return b}else this.v.clear(),this.m=!0;g=this.encode(g);if(!g.length)return f;b=this.g;b=da(b)?b(g):g.split(this.split);this.filter&&(b=ba(b,this.filter));C=b.length;d=!0;e=[];var R=G(),Y=0;1<C&&(this.depth&&"strict"===this.g?A=!0:b.sort(V));if(!A||(z=this.o))for(var ha=this.c;Y<C;Y++){var M=b[Y];if(M){if(A){if(!u)if(z[M])u= | ||
M,R[M]=1;else if(!y)return f;if(y&&Y===C-1&&!e.length)A=!1,M=u||M,R[M]=0;else if(!u)continue}if(!R[M]){var N=[],aa=!1,T=0,U=A?z[u]:this.u;if(U)for(var ea=void 0,S=0;S<ha-q;S++)if(ea=U[S]&&U[S][M])N[T++]=ea,aa=!0;if(aa)u=M,e[e.length]=1<T?N.concat.apply([],N):N[0];else if(!y){d=!1;break}R[M]=1}}}else d=!1;d&&(f=ua(e,c,h,y));this.cache&&this.v.set(a,f);return f}};p.prototype.find=function(a,c){return this.where(a,c,1)[0]||null};p.prototype.where=function(a,c,b,d){var e=this.s,f=[],g=0,k;if(Q(a)){b|| | ||
(b=c);var h=Object.keys(a);var q=h.length;var y=!1;if(1===q&&"id"===h[0])return[e[a.id]];if((k=this.I)&&!d)for(var v=0;v<k.length;v++){var A=k[v],u=a[A];if(!I(u)){var r=this.B[A]["@"+u];if(0===--q)return r;h.splice(h.indexOf(A),1);delete a[A];break}}k=Array(q);for(v=0;v<q;v++)k[v]=h[v].split(":")}else{if(da(a)){c=d||Object.keys(e);b=c.length;for(h=0;h<b;h++)q=e[c[h]],a(q)&&(f[g++]=q);return f}if(I(c))return[e[a]];if("id"===a)return[e[c]];h=[a];q=1;k=[a.split(":")];y=!0}d=r||d||Object.keys(e);v=d.length; | ||
for(A=0;A<v;A++){u=r?d[A]:e[d[A]];for(var D=!0,B=0;B<q;B++){y||(c=a[h[B]]);var C=k[B],z=C.length,x=u;if(1<z)for(var J=0;J<z;J++)x=x[C[J]];else x=x[C[0]];if(x!==c){D=!1;break}}if(D&&(f[g++]=u,b&&g===b))break}return f};p.prototype.info=function(){if(this.i)for(var a=0;a<this.i;a++)this.b[a].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.C?this.cache.C.length:!1,matcher:la.length+(this.h?this.h.length:0),worker:this.i,threshold:this.threshold, | ||
depth:this.depth,resolution:this.c,contextual:this.depth&&"strict"===this.g}};p.prototype.clear=function(){return this.destroy().init()};p.prototype.destroy=function(){this.cache&&(this.v.clear(),this.v=null);this.u=this.o=this.f=null;if(this.a){for(var a=this.a.keys,c=0;c<a.length;c++)this.a.index[a[c]].destroy();this.a=this.s=null}return this};p.prototype.export=function(a){var c=!a||I(a.serialize)||a.serialize;if(this.a){var b=!a||I(a.doc)||a.doc,d=!a||I(a.index)||a.index;a=[];var e=0;if(d)for(d= | ||
this.a.keys;e<d.length;e++){var f=this.a.index[d[e]];a[e]=[f.u,f.o,Object.keys(f.f)]}b&&(a[e]=this.s)}else a=[this.u,this.o,Object.keys(this.f)];c&&(a=JSON.stringify(a));return a};p.prototype.import=function(a,c){if(!c||I(c.serialize)||c.serialize)a=JSON.parse(a);var b=G();if(this.a){var d=!c||I(c.doc)||c.doc,e=0;if(!c||I(c.index)||c.index){c=this.a.keys;for(var f=c.length,g=a[0][2];e<g.length;e++)b[g[e]]=1;for(e=0;e<f;e++)g=this.a.index[c[e]],g.u=a[e][0],g.o=a[e][1],g.f=b}d&&(this.s=Q(d)?d:a[e])}else{d= | ||
a[2];for(e=0;e<d.length;e++)b[d[e]]=1;this.u=a[0];this.o=a[1];this.f=b}};var Ia=function(){var a=l("\\s+"),c=l("[^a-z0-9 ]"),b=[l("[-/]")," ",c,"",a," "];return function(d){return L(F(d.toLowerCase(),b))}}(),ia={icase:function(a){return a.toLowerCase()},simple:function(){var a=l("\\s+"),c=l("[^a-z0-9 ]"),b=l("[-/]"),d=l("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=l("[\u00e8\u00e9\u00ea\u00eb]"),f=l("[\u00ec\u00ed\u00ee\u00ef]"),g=l("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),k=l("[\u00f9\u00fa\u00fb\u00fc\u0171]"), | ||
h=l("[\u00fd\u0177\u00ff]"),q=l("\u00f1"),y=l("[\u00e7c]"),v=l("\u00df"),A=l(" & "),u=[d,"a",e,"e",f,"i",g,"o",k,"u",h,"y",q,"n",y,"k",v,"s",A," and ",b," ",c,"",a," "];return function(r){r=F(r.toLowerCase(),u);return" "===r?"":r}}(),advanced:function(){var a=l("ae"),c=l("ai"),b=l("ay"),d=l("ey"),e=l("oe"),f=l("ue"),g=l("ie"),k=l("sz"),h=l("zs"),q=l("ck"),y=l("cc"),v=l("sh"),A=l("th"),u=l("dt"),r=l("ph"),D=l("pf"),B=l("ou"),C=l("uo"),z=[a,"a",c,"ei",b,"ei",d,"ei",e,"o",f,"u",g,"i",k,"s",h,"s",v,"s", | ||
q,"k",y,"k",A,"t",u,"t",r,"f",D,"f",B,"o",C,"u"];return function(x,J){if(!x)return x;x=this.simple(x);2<x.length&&(x=F(x,z));J||1<x.length&&(x=L(x));return x}}(),extra:function(){var a=l("p"),c=l("z"),b=l("[cgq]"),d=l("n"),e=l("d"),f=l("[vw]"),g=l("[aeiouy]"),k=[a,"b",c,"s",b,"k",d,"m",e,"t",f,"f",g,""];return function(h){if(!h)return h;h=this.advanced(h,!0);if(1<h.length){h=h.split(" ");for(var q=0;q<h.length;q++){var y=h[q];1<y.length&&(h[q]=y[0]+F(y.substring(1),k))}h=h.join(" ");h=L(h)}return h}}(), | ||
balance:Ia},Ga=function(){function a(c){this.clear();this.J=!0!==c&&c}a.prototype.clear=function(){this.cache=G();this.count=G();this.index=G();this.C=[]};a.prototype.set=function(c,b){if(this.J&&I(this.cache[c])){var d=this.C.length;if(d===this.J){d--;var e=this.C[d];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[c]=d;this.C[d]=c;this.count[c]=-1;this.cache[c]=b;this.get(c)}else this.cache[c]=b};a.prototype.get=function(c){var b=this.cache[c];if(this.J&&b){var d=++this.count[c], | ||
e=this.index,f=e[c];if(0<f){for(var g=this.C,k=f;this.count[g[--f]]<=d&&-1!==f;);f++;if(f!==k){for(d=k;d>f;d--)k=g[d-1],g[d]=k,e[k]=d;g[f]=c;e[c]=f}}}return b};return a}();return p}(function(){var n={},t="undefined"!==typeof Blob&&"undefined"!==typeof URL&&URL.createObjectURL;return function(p,E,K,ba,m){K=t?URL.createObjectURL(new Blob(["("+K.toString()+")()"],{type:"text/javascript"})):p+".es5.js";p+="-"+E;n[p]||(n[p]=[]);n[p][m]=new Worker(K);n[p][m].onmessage=ba;console.log("Register Worker: "+ | ||
p+"@"+m);return n[p][m]}}()),this); | ||
'use strict';function ma(q){var u=0;return function(){return u<q.length?{done:!1,value:q[u++]}:{done:!0}}}var na="function"==typeof Object.defineProperties?Object.defineProperty:function(q,u,r){q!=Array.prototype&&q!=Object.prototype&&(q[u]=r.value)},Z="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function pa(){pa=function(){};Z.Symbol||(Z.Symbol=qa)}function ra(q,u){this.b=q;na(this,"description",{configurable:!0,writable:!0,value:u})} | ||
ra.prototype.toString=function(){return this.b};var qa=function(){function q(r){if(this instanceof q)throw new TypeError("Symbol is not a constructor");return new ra("jscomp_symbol_"+(r||"")+"_"+u++,r)}var u=0;return q}();function sa(){pa();var q=Z.Symbol.iterator;q||(q=Z.Symbol.iterator=Z.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[q]&&na(Array.prototype,q,{configurable:!0,writable:!0,value:function(){return ta(ma(this))}});sa=function(){}} | ||
function ta(q){sa();q={next:q};q[Z.Symbol.iterator]=function(){return this};return q}function za(q,u){sa();q instanceof String&&(q+="");var r=0,E={next:function(){if(r<q.length){var K=r++;return{value:u(K,q[K]),done:!1}}E.next=function(){return{done:!0,value:void 0}};return E.next()}};E[Symbol.iterator]=function(){return E};return E} | ||
function Aa(q,u){if(u){var r=Z;q=q.split(".");for(var E=0;E<q.length-1;E++){var K=q[E];K in r||(r[K]={});r=r[K]}q=q[q.length-1];E=r[q];u=u(E);u!=E&&null!=u&&na(r,q,{configurable:!0,writable:!0,value:u})}}Aa("Array.prototype.keys",function(q){return q?q:function(){return za(this,function(u){return u})}});function Ba(q){var u="undefined"!=typeof Symbol&&Symbol.iterator&&q[Symbol.iterator];return u?u.call(q):{next:ma(q)}} | ||
Aa("Promise",function(q){function u(n){this.h=0;this.m=void 0;this.b=[];var x=this.j();try{n(x.resolve,x.reject)}catch(l){x.reject(l)}}function r(){this.b=null}function E(n){return n instanceof u?n:new u(function(x){x(n)})}if(q)return q;r.prototype.h=function(n){if(null==this.b){this.b=[];var x=this;this.j(function(){x.m()})}this.b.push(n)};var K=Z.setTimeout;r.prototype.j=function(n){K(n,0)};r.prototype.m=function(){for(;this.b&&this.b.length;){var n=this.b;this.b=[];for(var x=0;x<n.length;++x){var l= | ||
n[x];n[x]=null;try{l()}catch(F){this.l(F)}}}this.b=null};r.prototype.l=function(n){this.j(function(){throw n;})};u.prototype.j=function(){function n(F){return function(I){l||(l=!0,F.call(x,I))}}var x=this,l=!1;return{resolve:n(this.L),reject:n(this.l)}};u.prototype.L=function(n){if(n===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(n instanceof u)this.M(n);else{a:switch(typeof n){case "object":var x=null!=n;break a;case "function":x=!0;break a;default:x=!1}x?this.K(n):this.w(n)}}; | ||
u.prototype.K=function(n){var x=void 0;try{x=n.then}catch(l){this.l(l);return}"function"==typeof x?this.N(x,n):this.w(n)};u.prototype.l=function(n){this.B(2,n)};u.prototype.w=function(n){this.B(1,n)};u.prototype.B=function(n,x){if(0!=this.h)throw Error("Cannot settle("+n+", "+x+"): Promise already settled in state"+this.h);this.h=n;this.m=x;this.I()};u.prototype.I=function(){if(null!=this.b){for(var n=0;n<this.b.length;++n)ba.h(this.b[n]);this.b=null}};var ba=new r;u.prototype.M=function(n){var x= | ||
this.j();n.F(x.resolve,x.reject)};u.prototype.N=function(n,x){var l=this.j();try{n.call(x,l.resolve,l.reject)}catch(F){l.reject(F)}};u.prototype.then=function(n,x){function l(L,W){return"function"==typeof L?function(ja){try{F(L(ja))}catch(ka){I(ka)}}:W}var F,I,ca=new u(function(L,W){F=L;I=W});this.F(l(n,F),l(x,I));return ca};u.prototype.catch=function(n){return this.then(void 0,n)};u.prototype.F=function(n,x){function l(){switch(F.h){case 1:n(F.m);break;case 2:x(F.m);break;default:throw Error("Unexpected state: "+ | ||
F.h);}}var F=this;null==this.b?ba.h(l):this.b.push(l)};u.resolve=E;u.reject=function(n){return new u(function(x,l){l(n)})};u.race=function(n){return new u(function(x,l){for(var F=Ba(n),I=F.next();!I.done;I=F.next())E(I.value).F(x,l)})};u.all=function(n){var x=Ba(n),l=x.next();return l.done?E([]):new u(function(F,I){function ca(ja){return function(ka){L[ja]=ka;W--;0==W&&F(L)}}var L=[],W=0;do L.push(void 0),W++,E(l.value).F(ca(L.length-1),I),l=x.next();while(!l.done)})};return u}); | ||
(function(q,u,r){var E;(E=r.define)&&E.amd?E([],function(){return u}):(E=r.modules)?E[q.toLowerCase()]=u:"object"===typeof exports?module.exports=u:r[q]=u})("FlexSearch",function Ca(q){function r(a,c){var b=c?c.id:a&&a.id;this.id=b||0===b?b:Da++;this.init(a,c);x(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].f):Object.keys(this.f)});x(this,"length",function(){return this.index.length})}function E(a,c,b,d){this.D!==this.i&&(this.A=this.A.concat(b),this.D++,d&&this.A.length>= | ||
d&&(this.D=this.i),this.D===this.i&&(this.cache&&this.u.set(c,this.A),this.H&&this.H(this.A)));return this}function K(a){var c=G(),b;for(b in a)if(a.hasOwnProperty(b)){var d=a[b];M(d)?c[b]=d.slice(0):P(d)?c[b]=K(d):c[b]=d}return c}function ba(a,c){for(var b=a.length,d=da(c),e=[],f=0,g=0;f<b;f++){var h=a[f];if(d&&c(h)||!d&&!c[h])e[g++]=h}return e}function n(a,c,b,d,e,f,g,h,k,m){b=ua(b,g?0:e,h,f,c,k,m);if(h){h=b.page;var w=b.next;b=b.result}if(g)c=this.where(g,null,e,b);else{c=b;b=this.v;e=c.length; | ||
f=Array(e);for(g=0;g<e;g++)f[g]=b[c[g]];c=f}b=c;d&&(da(d)||(X=d.split(":"),1<X.length?d=ka:(X=X[0],d=ja)),b.sort(d));b=fa(h,w,b);this.cache&&this.u.set(a,b);return b}function x(a,c,b){Object.defineProperty(a,c,{get:b})}function l(a){return new RegExp(a,"g")}function F(a,c){for(var b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a}function I(a,c,b,d,e,f,g,h){if(c[b])return c[b];e=e?(h-(g||h/1.5))*f+(g||h/1.5)*e:f;c[b]=e;e>=g&&(a=a[h-(e+.5>>0)],a=a[b]||(a[b]=[]),a[a.length]=d);return e}function ca(a, | ||
c){if(a)for(var b=Object.keys(a),d=0,e=b.length;d<e;d++){var f=b[d],g=a[f];if(g)for(var h=0,k=g.length;h<k;h++)if(g[h]===c){1===k?delete a[f]:g.splice(h,1);break}else P(g[h])&&ca(g[h],c)}}function L(a){for(var c="",b="",d="",e=0;e<a.length;e++){var f=a[e];if(f!==b)if(e&&"h"===f){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===b||"e"===b||"i"===b||"o"===b||"u"===b||"y"===b)&&d||" "===b)c+=f}else c+=f;d=e===a.length-1?"":a[e+1];b=f}return c}function W(a,c){a=a.length-c.length;return 0> | ||
a?1:a?-1:0}function ja(a,c){a=a[X];c=c[X];return a<c?-1:a>c?1:0}function ka(a,c){for(var b=X.length,d=0;d<b;d++)a=a[X[d]],c=c[X[d]];return a<c?-1:a>c?1:0}function fa(a,c,b){return a?{page:a,next:c?""+c:null,result:b}:b}function ua(a,c,b,d,e,f,g){var h=[];if(!0===b){b="0";var k=""}else k=b&&b.split(":");var m=a.length;if(1<m){var w=G(),z=[],v,p=0,t,D=!0,B=0,C;if(k)if(2===k.length){var A=k;k=!1}else k=C=parseInt(k[0],10);if(g){for(v=G();p<m;p++)if("not"===e[p]){var y=a[p];var J=y.length;for(t=0;t<J;t++)v["@"+ | ||
y[t]]=1}else var R=p+1;if(H(R))return fa(b,S,h);p=0}else var Y=T(e)&&e;for(var ha;p<m;p++){var N=p===(R||m)-1;if(!Y||!p)if((t=Y||e&&e[p])&&"and"!==t)if("or"===t)ha=!1;else continue;else ha=f=!0;y=a[p];if(J=y.length){if(D)if(U){var O=U.length;for(t=0;t<O;t++){D=U[t];var aa="@"+D;g&&v[aa]||(w[aa]=1,f||(h[B++]=D))}var U=null;D=!1}else{U=y;continue}aa=!1;for(t=0;t<J;t++){O=y[t];var V="@"+O,ea=f?w[V]||0:p;if(!(!ea&&!d||g&&v[V]||!f&&w[V]))if(ea===p){if(N){if(!C||--C<B)if(h[B++]=O,c&&B===c)return fa(b,B+ | ||
(k||0),h)}else w[V]=p+1;aa=!0}else d&&(V=z[ea]||(z[ea]=[]),V[V.length]=O)}if(ha&&!aa&&!d)break}else if(ha&&!d)return fa(b,S,y)}if(U)if(p=U.length,g)for(t=k?parseInt(k,10):0;t<p;t++)a=U[t],v["@"+a]||(h[B++]=a);else h=U;if(d)for(B=h.length,A?(p=parseInt(A[0],10)+1,t=parseInt(A[1],10)+1):(p=z.length,t=0);p--;)if(O=z[p]){for(J=O.length;t<J;t++)if(d=O[t],!g||!v["@"+d])if(h[B++]=d,c&&B===c)return fa(b,p+":"+t,h);t=0}}else!m||e&&"not"===e[0]||(h=a[0],k&&(k=parseInt(k[0],10)));if(c){g=h.length;k&&k>g&&(k= | ||
0);k=k||0;var S=k+c;S<g?h=h.slice(k,S):(S=0,k&&(h=h.slice(k)))}return fa(b,S,h)}function T(a){return"string"===typeof a}function M(a){return a.constructor===Array}function da(a){return"function"===typeof a}function P(a){return"object"===typeof a}function H(a){return"undefined"===typeof a}function va(a){for(var c=Array(a),b=0;b<a;b++)c[b]=G();return c}function G(){return Object.create(null)}function Ea(){var a,c;self.onmessage=function(b){if(b=b.data)if(b.search){var d=c.search(b.content,b.threshold? | ||
{limit:b.limit,threshold:b.threshold,where:b.where}:b.limit);self.postMessage({id:a,content:b.content,limit:b.limit,result:d})}else b.add?c.add(b.id,b.content):b.update?c.update(b.id,b.content):b.remove?c.remove(b.id):b.clear?c.clear():b.info?(b=c.info(),b.worker=a,console.log(b)):b.register&&(a=b.id,b.options.cache=!1,b.options.async=!1,b.options.worker=!1,c=(new Function(b.register.substring(b.register.indexOf("{")+1,b.register.lastIndexOf("}"))))(),c=new c(b.options))}}function Fa(a,c,b,d){a=q("flexsearch", | ||
"id"+a,Ea,function(f){(f=f.data)&&f.result&&d(f.id,f.content,f.result,f.limit,f.where,f.cursor,f.suggest)},c);var e=Ca.toString();b.id=c;a.postMessage({register:e,options:b,id:c});return a}var Q={encode:"icase",g:"forward",split:/\W+/,cache:!1,async:!1,i:!1,G:!1,a:!1,c:9,threshold:0,depth:0},wa={memory:{encode:"extra",g:"strict",threshold:0,c:1},speed:{encode:"icase",g:"strict",threshold:1,c:3,depth:2},match:{encode:"extra",g:"full",threshold:1,c:3},score:{encode:"extra",g:"strict",threshold:1,c:9, | ||
depth:4},balance:{encode:"balance",g:"strict",threshold:0,c:3,depth:3},fast:{encode:"icase",g:"strict",threshold:8,c:9,depth:1}},la=[],Da=0,xa={},ya={};r.create=function(a,c){return new r(a,c)};r.registerMatcher=function(a){for(var c in a)a.hasOwnProperty(c)&&la.push(l(c),a[c]);return this};r.registerEncoder=function(a,c){ia[a]=c.bind(ia);return this};r.registerLanguage=function(a,c){xa[a]=c.filter;ya[a]=c.stemmer;return this};r.encode=function(a,c){return ia[a](c)};r.prototype.init=function(a,c){this.h= | ||
[];if(c){var b=c.preset;a=c}else a||(a=Q),b=a.preset;c={};T(a)?((c=wa[a])||console.warn("Preset not found: "+a),a={}):b&&((c=wa[b])||console.warn("Preset not found: "+b));if(b=a.worker)if("undefined"===typeof Worker)a.worker=!1,this.b=null;else{var d=parseInt(b,10)||4;this.w=-1;this.D=0;this.A=[];this.H=null;this.b=Array(d);for(var e=0;e<d;e++)this.b[e]=Fa(this.id,e,a,E.bind(this))}this.g=a.tokenize||c.g||this.g||Q.g;this.split=H(b=a.split)?this.split||Q.split:T(b)?l(b):b;this.G=a.rtl||this.G||Q.G; | ||
this.async="undefined"===typeof Promise||H(b=a.async)?this.async||Q.async:b;this.i=H(b=a.worker)?this.i||Q.i:b;this.threshold=H(b=a.threshold)?c.threshold||this.threshold||Q.threshold:b;this.c=H(b=a.resolution)?b=c.c||this.c||Q.c:b;b<=this.threshold&&(this.c=this.threshold+1);this.depth="strict"!==this.g||H(b=a.depth)?c.depth||this.depth||Q.depth:b;this.j=(b=H(b=a.encode)?c.encode||Q.encode:b)&&ia[b]&&ia[b].bind(ia)||(da(b)?b:this.j||!1);(b=a.matcher)&&this.addMatcher(b);if(b=(c=a.lang)||a.filter){T(b)&& | ||
(b=xa[b]);if(M(b)){d=this.j;e=G();for(var f=0;f<b.length;f++){var g=d?d(b[f]):b[f];e[g]=1}b=e}this.filter=b}if(b=c||a.stemmer){c=T(b)?ya[b]:b;d=this.j;e=[];for(var h in c)c.hasOwnProperty(h)&&(f=d?d(h):h,e.push(l(f+"($|\\W)"),d?d(c[h]):c[h]));this.stemmer=e}this.a=e=(b=a.doc)?K(b):this.a||Q.a;this.s=va(this.c-(this.threshold||0));this.o=G();this.f=G();if(e){this.v=G();a.doc=null;h=e.index={};c=e.keys=[];d=e.field;f=e.tag;g=e.store;M(e.id)||(e.id=e.id.split(":"));if(g){var k=G();if(T(g))k[g]=1;else if(M(g))for(var m= | ||
0;m<g.length;m++)k[g[m]]=1;else P(g)&&(k=g);e.store=k}if(f){this.B=G();g=G();if(d)if(T(d))g[d]=a;else if(M(d))for(k=0;k<d.length;k++)g[d[k]]=a;else P(d)&&(g=d);M(f)||(e.tag=f=[f]);for(d=0;d<f.length;d++)this.B[f[d]]=G();this.I=f;d=g}if(d){if(!M(d))if(P(d)){var w=d;e.field=d=Object.keys(d)}else e.field=d=[d];for(e=0;e<d.length;e++)f=d[e],M(f)||(w&&(a=w[f]),c[e]=f,d[e]=f.split(":")),h[f]=new r(a)}a.doc=b}this.m=!0;this.u=(this.cache=b=H(b=a.cache)?this.cache||Q.cache:b)?new Ga(b):!1;return this};r.prototype.encode= | ||
function(a){a&&(la.length&&(a=F(a,la)),this.h.length&&(a=F(a,this.h)),this.j&&(a=this.j(a)),this.stemmer&&(a=F(a,this.stemmer)));return a};r.prototype.addMatcher=function(a){var c=this.h,b;for(b in a)a.hasOwnProperty(b)&&c.push(l(b),a[b]);return this};r.prototype.add=function(a,c,b,d,e){if(this.a&&P(a))return this.l("add",a,c);if(c&&T(c)&&(a||0===a)){var f="@"+a;if(this.f[f]&&!d)return this.update(a,c);if(this.i)return++this.w>=this.b.length&&(this.w=0),this.b[this.w].postMessage({add:!0,id:a,content:c}), | ||
this.f[f]=""+this.w,b&&b(),this;if(!e){if(this.async&&"function"!==typeof importScripts){var g=this;f=new Promise(function(Y){setTimeout(function(){g.add(a,c,null,d,!0);g=null;Y()})});if(b)f.then(b);else return f;return this}if(b)return this.add(a,c,null,d,!0),b(),this}c=this.encode(c);if(!c.length)return this;b=this.g;e=da(b)?b(c):c.split(this.split);this.filter&&(e=ba(e,this.filter));var h=G();h._ctx=G();for(var k=e.length,m=this.threshold,w=this.depth,z=this.c,v=this.s,p=this.G,t=0;t<k;t++){var D= | ||
e[t];if(D){var B=D.length,C=(p?t+1:k-t)/k,A="";switch(b){case "reverse":case "both":for(var y=B;--y;)A=D[y]+A,I(v,h,A,a,p?1:(B-y)/B,C,m,z-1);A="";case "forward":for(y=0;y<B;y++)A+=D[y],I(v,h,A,a,p?(y+1)/B:1,C,m,z-1);break;case "full":for(y=0;y<B;y++)for(var J=(p?y+1:B-y)/B,R=B;R>y;R--)A=D.substring(y,R),I(v,h,A,a,J,C,m,z-1);break;default:if(B=I(v,h,D,a,1,C,m,z-1),w&&1<k&&B>=m)for(B=h._ctx[D]||(h._ctx[D]=G()),D=this.o[D]||(this.o[D]=va(z-(m||0))),C=t-w,A=t+w+1,0>C&&(C=0),A>k&&(A=k);C<A;C++)C!==t&& | ||
I(D,B,e[C],a,0,z-(C<t?t-C:C-t),m,z-1)}}}this.f[f]=1;this.m=!1}return this};r.prototype.l=function(a,c,b){if(M(c)){var d=c.length;if(d--){for(var e=0;e<d;e++)this.l(a,c[e]);return this.l(a,c[d],b)}}else{var f=this.a.index,g=this.a.keys,h=this.a.tag;e=this.a.store;var k;var m=this.a.id;d=c;for(var w=0;w<m.length;w++)d=d[m[w]];if("remove"===a&&(delete this.v[d],m=g.length,m--)){for(c=0;c<m;c++)f[g[c]].remove(d);return f[g[m]].remove(d,b)}if(h){for(k=0;k<h.length;k++){var z=h[k];var v=c;m=z.split(":"); | ||
for(w=0;w<m.length;w++)v=v[m[w]];v="@"+v}k=this.B[z];k=k[v]||(k[v]=[])}m=this.a.field;h=0;for(z=m.length;h<z;h++){w=m[h];v=c;for(var p=0;p<w.length;p++)v=v[w[p]];w=f[g[h]];p="add"===a?w.add:w.update;h===z-1?p.call(w,d,v,b):p.call(w,d,v)}if(e){b=Object.keys(e);a=G();for(f=0;f<b.length;f++)if(g=b[f],e[g])for(g=g.split(":"),h=m=void 0,z=0;z<g.length;z++)v=g[z],h=(h||c)[v],m=(m||a)[v]=h;c=a}k&&(k[k.length]=c);this.v[d]=c}return this};r.prototype.update=function(a,c,b){if(this.a&&P(a))return this.l("update", | ||
a,c);this.f["@"+a]&&T(c)&&(this.remove(a),this.add(a,c,b,!0));return this};r.prototype.remove=function(a,c,b){if(this.a&&P(a))return this.l("remove",a,c);var d="@"+a;if(this.f[d]){if(this.i)return this.b[this.f[d]].postMessage({remove:!0,id:a}),delete this.f[d],c&&c(),this;if(!b){if(this.async&&"function"!==typeof importScripts){var e=this;d=new Promise(function(f){setTimeout(function(){e.remove(a,null,!0);e=null;f()})});if(c)d.then(c);else return d;return this}if(c)return this.remove(a,null,!0), | ||
c(),this}for(c=0;c<this.c-(this.threshold||0);c++)ca(this.s[c],a);this.depth&&ca(this.o,a);delete this.f[d];this.m=!1}return this};var X;r.prototype.search=function(a,c,b,d){if(P(c)){if(M(c))for(var e=0;e<c.length;e++)c[e].query=a;else c.query=a;a=c;c=1E3}else c&&da(c)?(b=c,c=1E3):c||0===c||(c=1E3);var f=[],g=a;if(P(a)&&!M(a)){b||(b=a.callback)&&(g.callback=null);var h=a.sort;var k=a.page;c=a.limit;var m=a.threshold;var w=a.suggest;a=a.query}if(this.a){m=this.a.index;var z=g.where,v=g.bool||"or", | ||
p=g.field,t=v,D,B;if(p)M(p)||(p=[p]);else if(M(g)){var C=g;p=[];t=[];for(var A=0;A<g.length;A++)d=g[A],e=d.bool||v,p[A]=d.field,t[A]=e,"not"===e?D=!0:"and"===e&&(B=!0)}else p=this.a.keys;v=p.length;for(A=0;A<v;A++)C&&(g=C[A]),k&&!T(g)&&(g.page=null,g.limit=0),f[A]=m[p[A]].search(g,0);if(b)return b(n.call(this,a,t,f,h,c,w,z,k,B,D));if(this.async){var y=this;return new Promise(function(oa){Promise.all(f).then(function(Ha){oa(n.call(y,a,t,Ha,h,c,w,z,k,B,D))})})}return n.call(this,a,t,f,h,c,w,z,k,B,D)}m|| | ||
(m=this.threshold||0);if(this.i)for(this.H=b,this.D=0,this.A=[],m=0;m<this.i;m++)this.b[m].postMessage({search:!0,limit:c,content:g});else{if(!d){if(this.async&&"function"!==typeof importScripts){var J=this;m=new Promise(function(oa){setTimeout(function(){oa(J.search(g,c,null,!0));J=null})});if(b)m.then(b);else return m;return this}if(b)return b(this.search(g,c,null,!0)),this}if(!a||!T(a))return f;g=a;if(this.cache)if(this.m){if(b=this.u.get(a))return b}else this.u.clear(),this.m=!0;g=this.encode(g); | ||
if(!g.length)return f;b=this.g;b=da(b)?b(g):g.split(this.split);this.filter&&(b=ba(b,this.filter));C=b.length;d=!0;e=[];var R=G(),Y=0;1<C&&(this.depth&&"strict"===this.g?v=!0:b.sort(W));if(!v||(A=this.o))for(var ha=this.c;Y<C;Y++){var N=b[Y];if(N){if(v){if(!p)if(A[N])p=N,R[N]=1;else if(!w)return f;if(w&&Y===C-1&&!e.length)v=!1,N=p||N,R[N]=0;else if(!p)continue}if(!R[N]){var O=[],aa=!1,U=0,V=v?A[p]:this.s;if(V)for(var ea=void 0,S=0;S<ha-m;S++)if(ea=V[S]&&V[S][N])O[U++]=ea,aa=!0;if(aa)p=N,e[e.length]= | ||
1<U?O.concat.apply([],O):O[0];else if(!w){d=!1;break}R[N]=1}}}else d=!1;d&&(f=ua(e,c,k,w));this.cache&&this.u.set(a,f);return f}};r.prototype.find=function(a,c){return this.where(a,c,1)[0]||null};r.prototype.where=function(a,c,b,d){var e=this.v,f=[],g=0,h;if(P(a)){b||(b=c);var k=Object.keys(a);var m=k.length;var w=!1;if(1===m&&"id"===k[0])return[e[a.id]];if((h=this.I)&&!d)for(var z=0;z<h.length;z++){var v=h[z],p=a[v];if(!H(p)){var t=this.B[v]["@"+p];if(0===--m)return t;k.splice(k.indexOf(v),1);delete a[v]; | ||
break}}h=Array(m);for(z=0;z<m;z++)h[z]=k[z].split(":")}else{if(da(a)){c=d||Object.keys(e);b=c.length;for(k=0;k<b;k++)m=e[c[k]],a(m)&&(f[g++]=m);return f}if(H(c))return[e[a]];if("id"===a)return[e[c]];k=[a];m=1;h=[a.split(":")];w=!0}d=t||d||Object.keys(e);z=d.length;for(v=0;v<z;v++){p=t?d[v]:e[d[v]];for(var D=!0,B=0;B<m;B++){w||(c=a[k[B]]);var C=h[B],A=C.length,y=p;if(1<A)for(var J=0;J<A;J++)y=y[C[J]];else y=y[C[0]];if(y!==c){D=!1;break}}if(D&&(f[g++]=p,b&&g===b))break}return f};r.prototype.info=function(){if(this.i)for(var a= | ||
0;a<this.i;a++)this.b[a].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.C?this.cache.C.length:!1,matcher:la.length+(this.h?this.h.length:0),worker:this.i,threshold:this.threshold,depth:this.depth,resolution:this.c,contextual:this.depth&&"strict"===this.g}};r.prototype.clear=function(){return this.destroy().init()};r.prototype.destroy=function(){this.cache&&(this.u.clear(),this.u=null);this.s=this.o=this.f=null;if(this.a){for(var a=this.a.keys, | ||
c=0;c<a.length;c++)this.a.index[a[c]].destroy();this.a=this.v=null}return this};r.prototype.export=function(a){var c=!a||H(a.serialize)||a.serialize;if(this.a){var b=!a||H(a.doc)||a.doc,d=!a||H(a.index)||a.index;a=[];var e=0;if(d)for(d=this.a.keys;e<d.length;e++){var f=this.a.index[d[e]];a[e]=[f.s,f.o,Object.keys(f.f)]}b&&(a[e]=this.v)}else a=[this.s,this.o,Object.keys(this.f)];c&&(a=JSON.stringify(a));return a};r.prototype.import=function(a,c){if(!c||H(c.serialize)||c.serialize)a=JSON.parse(a);var b= | ||
G();if(this.a){var d=!c||H(c.doc)||c.doc,e=0;if(!c||H(c.index)||c.index){c=this.a.keys;for(var f=c.length,g=a[0][2];e<g.length;e++)b[g[e]]=1;for(e=0;e<f;e++){g=this.a.index[c[e]];var h=a[e];h&&(g.s=h[0],g.o=h[1],g.f=b)}}d&&(this.v=P(d)?d:a[e])}else{d=a[2];for(e=0;e<d.length;e++)b[d[e]]=1;this.s=a[0];this.o=a[1];this.f=b}};var Ia=function(){var a=l("\\s+"),c=l("[^a-z0-9 ]"),b=[l("[-/]")," ",c,"",a," "];return function(d){return L(F(d.toLowerCase(),b))}}(),ia={icase:function(a){return a.toLowerCase()}, | ||
simple:function(){var a=l("\\s+"),c=l("[^a-z0-9 ]"),b=l("[-/]"),d=l("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=l("[\u00e8\u00e9\u00ea\u00eb]"),f=l("[\u00ec\u00ed\u00ee\u00ef]"),g=l("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),h=l("[\u00f9\u00fa\u00fb\u00fc\u0171]"),k=l("[\u00fd\u0177\u00ff]"),m=l("\u00f1"),w=l("[\u00e7c]"),z=l("\u00df"),v=l(" & "),p=[d,"a",e,"e",f,"i",g,"o",h,"u",k,"y",m,"n",w,"k",z,"s",v," and ",b," ",c,"",a," "];return function(t){t=F(t.toLowerCase(),p);return" "===t?"":t}}(),advanced:function(){var a= | ||
l("ae"),c=l("ai"),b=l("ay"),d=l("ey"),e=l("oe"),f=l("ue"),g=l("ie"),h=l("sz"),k=l("zs"),m=l("ck"),w=l("cc"),z=l("sh"),v=l("th"),p=l("dt"),t=l("ph"),D=l("pf"),B=l("ou"),C=l("uo"),A=[a,"a",c,"ei",b,"ei",d,"ei",e,"o",f,"u",g,"i",h,"s",k,"s",z,"s",m,"k",w,"k",v,"t",p,"t",t,"f",D,"f",B,"o",C,"u"];return function(y,J){if(!y)return y;y=this.simple(y);2<y.length&&(y=F(y,A));J||1<y.length&&(y=L(y));return y}}(),extra:function(){var a=l("p"),c=l("z"),b=l("[cgq]"),d=l("n"),e=l("d"),f=l("[vw]"),g=l("[aeiouy]"), | ||
h=[a,"b",c,"s",b,"k",d,"m",e,"t",f,"f",g,""];return function(k){if(!k)return k;k=this.advanced(k,!0);if(1<k.length){k=k.split(" ");for(var m=0;m<k.length;m++){var w=k[m];1<w.length&&(k[m]=w[0]+F(w.substring(1),h))}k=k.join(" ");k=L(k)}return k}}(),balance:Ia},Ga=function(){function a(c){this.clear();this.J=!0!==c&&c}a.prototype.clear=function(){this.cache=G();this.count=G();this.index=G();this.C=[]};a.prototype.set=function(c,b){if(this.J&&H(this.cache[c])){var d=this.C.length;if(d===this.J){d--; | ||
var e=this.C[d];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[c]=d;this.C[d]=c;this.count[c]=-1;this.cache[c]=b;this.get(c)}else this.cache[c]=b};a.prototype.get=function(c){var b=this.cache[c];if(this.J&&b){var d=++this.count[c],e=this.index,f=e[c];if(0<f){for(var g=this.C,h=f;this.count[g[--f]]<=d&&-1!==f;);f++;if(f!==h){for(d=h;d>f;d--)h=g[d-1],g[d]=h,e[h]=d;g[f]=c;e[c]=f}}}return b};return a}();return r}(function(){var q={},u="undefined"!==typeof Blob&&"undefined"!== | ||
typeof URL&&URL.createObjectURL;return function(r,E,K,ba,n){K=u?URL.createObjectURL(new Blob(["("+K.toString()+")()"],{type:"text/javascript"})):r+".es5.js";r+="-"+E;q[r]||(q[r]=[]);q[r][n]=new Worker(K);q[r][n].onmessage=ba;console.log("Register Worker: "+r+"@"+n);return q[r][n]}}()),this); |
/* | ||
FlexSearch v0.6.24 | ||
FlexSearch v0.6.30 | ||
Copyright 2019 Nextapps GmbH | ||
@@ -8,14 +8,14 @@ Author: Thomas Wilkerling | ||
*/ | ||
'use strict';(function(n,C,D){let t;(t=D.define)&&t.amd?t([],function(){return C}):(t=D.modules)?t[n.toLowerCase()]=C:"object"===typeof exports?module.exports=C:D[n]=C})("FlexSearch",function(){function n(a,b){const c=b?b.id:a&&a.id;this.id=c||0===c?c:T++;this.init(a,b);D(this,"index",function(){return Object.keys(this.c)});D(this,"length",function(){return this.index.length})}function C(a,b){const c=a.length,g=G(b),d=[];for(let h=0,f=0;h<c;h++){const e=a[h];if(g&&b(e)||!g&&!b[e])d[f++]=e}return d} | ||
function D(a,b,c){Object.defineProperty(a,b,{get:c})}function t(a){return new RegExp(a,"g")}function J(a,b){for(let c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}function H(a,b,c,g,d,h,f,e){if(b[c])return b[c];d=d?(e-(f||e/1.5))*h+(f||e/1.5)*d:h;b[c]=d;d>=f&&(a=a[e-(d+.5>>0)],a=a[c]||(a[c]=[]),a[a.length]=g);return d}function M(a,b){if(a){const c=Object.keys(a);for(let g=0,d=c.length;g<d;g++){const h=c[g],f=a[h];if(f)for(let e=0,k=f.length;e<k;e++)if(f[e]===b){1===k?delete a[h]:f.splice(e, | ||
1);break}else"object"===typeof f[e]&&M(f[e],b)}}}function U(a,b){a=a.length-b.length;return 0>a?1:a?-1:0}function N(a,b,c){return a?{page:a,next:b?""+b:null,result:c}:c}function I(a){return"string"===typeof a}function G(a){return"function"===typeof a}function K(a){return"undefined"===typeof a}function P(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=y();return b}function y(){return Object.create(null)}const B={encode:"icase",b:"forward",split:/\W+/,cache:!1,async:!1,m:!1,i:!1,l:!1,a:9,threshold:0,depth:0}, | ||
O=[];let T=0;const Q={},R={};n.create=function(a,b){return new n(a,b)};n.registerMatcher=function(a){for(const b in a)a.hasOwnProperty(b)&&O.push(t(b),a[b]);return this};n.registerEncoder=function(a,b){E[a]=b.bind(E);return this};n.registerLanguage=function(a,b){Q[a]=b.filter;R[a]=b.stemmer;return this};n.encode=function(a,b){return E[a](b)};n.prototype.init=function(a,b){this.j=[];if(b){var c=b.preset;a=b}else a||(a=B),c=a.preset;b={};this.b=a.tokenize||b.b||this.b||B.b;this.split=a.split||this.split|| | ||
B.split;this.i=a.rtl||this.i||B.i;this.threshold=K(c=a.threshold)?b.threshold||this.threshold||B.threshold:c;this.a=K(c=a.resolution)?c=b.a||this.a||B.a:c;c<=this.threshold&&(this.a=this.threshold+1);this.depth="strict"!==this.b||K(c=a.depth)?b.depth||this.depth||B.depth:c;this.g=(c=K(c=a.encode)?b.encode||B.encode:c)&&E[c]&&E[c].bind(E)||(G(c)?c:this.g||!1);(c=a.matcher)&&this.addMatcher(c);if(c=(b=a.lang)||a.filter){I(c)&&(c=Q[c]);if(c.constructor===Array){{var g=this.g;const h=y();for(let f=0;f< | ||
c.length;f++){const e=g?g(c[f]):c[f];h[e]=1}c=h}}this.filter=c}if(c=b||a.stemmer){var d;a=I(c)?R[c]:c;b=this.g;c=[];for(d in a)a.hasOwnProperty(d)&&(g=b?b(d):d,c.push(t(g+"($|\\W)"),b?b(a[d]):a[d]));this.stemmer=d=c}this.h=P(this.a-(this.threshold||0));this.f=y();this.c=y();return this};n.prototype.encode=function(a){a&&O.length&&(a=J(a,O));a&&this.j.length&&(a=J(a,this.j));a&&this.g&&(a=this.g(a));a&&this.stemmer&&(a=J(a,this.stemmer));return a};n.prototype.addMatcher=function(a){const b=this.j; | ||
for(const c in a)a.hasOwnProperty(c)&&b.push(t(c),a[c]);return this};n.prototype.add=function(a,b,c,g,d){if(b&&I(b)&&(a||0===a)){const u="@"+a;if(this.c[u]&&!g)return this.update(a,b);if(!d&&c)return this.add(a,b,null,g,!0),c(),this;b=this.encode(b);if(!b.length)return this;c=this.b;b=G(c)?c(b):b.split(this.split);this.filter&&(b=C(b,this.filter));g=y();g._ctx=y();d=b.length;const r=this.threshold,v=this.depth,w=this.a,p=this.h,m=this.i;for(let q=0;q<d;q++){var h=b[q];if(h){var f=h.length,e=(m?q+ | ||
1:d-q)/d,k="";switch(c){case "reverse":case "both":for(var l=f;--l;)k=h[l]+k,H(p,g,k,a,m?1:(f-l)/f,e,r,w-1);k="";case "forward":for(l=0;l<f;l++)k+=h[l],H(p,g,k,a,m?(l+1)/f:1,e,r,w-1);break;case "full":for(l=0;l<f;l++){const F=(m?l+1:f-l)/f;for(let x=f;x>l;x--)k=h.substring(l,x),H(p,g,k,a,F,e,r,w-1)}break;default:if(f=H(p,g,h,a,1,e,r,w-1),v&&1<d&&f>=r)for(f=g._ctx[h]||(g._ctx[h]=y()),h=this.f[h]||(this.f[h]=P(w-(r||0))),e=q-v,k=q+v+1,0>e&&(e=0),k>d&&(k=d);e<k;e++)e!==q&&H(h,f,b[e],a,0,w-(e<q?q-e:e- | ||
q),r,w-1)}}}this.c[u]=1}return this};n.prototype.update=function(a,b,c){this.c["@"+a]&&I(b)&&(this.remove(a),this.add(a,b,c,!0));return this};n.prototype.remove=function(a,b,c){const g="@"+a;if(this.c[g]){if(!c&&b)return this.remove(a,null,!0),b(),this;for(b=0;b<this.a-(this.threshold||0);b++)M(this.h[b],a);this.depth&&M(this.f,a);delete this.c[g]}return this};n.prototype.search=function(a,b,c,g){b&&G(b)?(c=b,b=1E3):b||0===b||(b=1E3);var d=[],h=a;if("object"===typeof a){var f=!1;b=a.limit;var e=a.threshold; | ||
var k=!1;a=a.query}e||(e=this.threshold||0);if(!g&&c)return c(this.search(h,b,null,!0)),this;if(!a||!I(a))return d;h=this.encode(a);if(!h.length)return d;a=this.b;a=G(a)?a(h):h.split(this.split);this.filter&&(a=C(a,this.filter));c=a.length;g=!0;h=[];var l=y(),u,r=0;1<c&&(this.depth&&"strict"===this.b?u=!0:a.sort(U));var v;if(!u||(v=this.f))for(var w=this.a;r<c;r++){var p=a[r];if(p){if(u){if(!m)if(v[p]){var m=p;l[p]=1}else if(!k)return d;if(k&&r===c-1&&!h.length)u=!1,p=m||p,l[p]=0;else if(!m)continue}if(!l[p]){var q= | ||
[],F=!1;let z=0;if(m=u?v[m]:this.h){let S;for(let L=0;L<w-e;L++)if(S=m[L]&&m[L][p])q[z++]=S,F=!0}if(F)m=p,h[h.length]=1<z?q.concat.apply([],q):q[0];else{g=!1;break}l[p]=1}}}else g=!1;if(g)a:{let z;d=[];!0===f?(f="0",e=""):e=f&&f.split(":");k=h.length;if(1<k){u=y();m=0;w=!0;g=0;var x;for(e&&(2===e.length?e=!1:e=x=parseInt(e[0],10));m<k;m++){l=m===k-1;v=h[m];c=v.length;if(!c){d=N(f,z,v);break a}if(w)if(A){r=A.length;for(a=0;a<r;a++)u["@"+A[a]]=1;var A=null;w=!1}else{A=v;continue}p=!1;for(a=0;a<c;a++)if(r= | ||
v[a],q="@"+r,(F=u[q]||0)&&F===m){if(l){if(!x||--x<g)if(d[g++]=r,b&&g===b){d=N(f,g+(e||0),d);break a}}else u[q]=m+1;p=!0}if(!p)break}A&&(d=A)}else k&&(d=h[0],e&&(e=parseInt(e[0],10)));b&&(A=d.length,e&&e>A&&(e=0),x=e||0,z=x+b,z<A?d=d.slice(x,z):(z=0,x&&(d=d.slice(x))));d=N(f,z,d)}return d};n.prototype.clear=function(){return this.destroy().init()};n.prototype.destroy=function(){this.h=this.f=this.c=null;return this};(function(){const a=t("\\s+"),b=t("[^a-z0-9 ]"),c=[t("[-/]")," ",b,"",a," "];return function(g){{g= | ||
J(g.toLowerCase(),c);let h="",f="";var d="";for(let e=0;e<g.length;e++){const k=g[e];if(k!==f)if(e&&"h"===k){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===f||"e"===f||"i"===f||"o"===f||"u"===f||"y"===f)&&d||" "===f)h+=k}else h+=k;d=e===g.length-1?"":g[e+1];f=k}g=h}return g}})();const E={icase:function(a){return a.toLowerCase()}};return n}(!1),this); | ||
'use strict';(function(n,C,D){let t;(t=D.define)&&t.amd?t([],function(){return C}):(t=D.modules)?t[n.toLowerCase()]=C:"object"===typeof exports?module.exports=C:D[n]=C})("FlexSearch",function(){function n(a,b){const c=b?b.id:a&&a.id;this.id=c||0===c?c:T++;this.init(a,b);D(this,"index",function(){return Object.keys(this.c)});D(this,"length",function(){return this.index.length})}function C(a,b){const c=a.length,g=H(b),d=[];for(let h=0,f=0;h<c;h++){const e=a[h];if(g&&b(e)||!g&&!b[e])d[f++]=e}return d} | ||
function D(a,b,c){Object.defineProperty(a,b,{get:c})}function t(a){return new RegExp(a,"g")}function K(a,b){for(let c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}function I(a,b,c,g,d,h,f,e){if(b[c])return b[c];d=d?(e-(f||e/1.5))*h+(f||e/1.5)*d:h;b[c]=d;d>=f&&(a=a[e-(d+.5>>0)],a=a[c]||(a[c]=[]),a[a.length]=g);return d}function M(a,b){if(a){const c=Object.keys(a);for(let g=0,d=c.length;g<d;g++){const h=c[g],f=a[h];if(f)for(let e=0,k=f.length;e<k;e++)if(f[e]===b){1===k?delete a[h]:f.splice(e, | ||
1);break}else"object"===typeof f[e]&&M(f[e],b)}}}function U(a,b){a=a.length-b.length;return 0>a?1:a?-1:0}function N(a,b,c){return a?{page:a,next:b?""+b:null,result:c}:c}function E(a){return"string"===typeof a}function H(a){return"function"===typeof a}function J(a){return"undefined"===typeof a}function P(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=y();return b}function y(){return Object.create(null)}const B={encode:"icase",b:"forward",split:/\W+/,cache:!1,async:!1,m:!1,i:!1,l:!1,a:9,threshold:0,depth:0}, | ||
O=[];let T=0;const Q={},R={};n.create=function(a,b){return new n(a,b)};n.registerMatcher=function(a){for(const b in a)a.hasOwnProperty(b)&&O.push(t(b),a[b]);return this};n.registerEncoder=function(a,b){F[a]=b.bind(F);return this};n.registerLanguage=function(a,b){Q[a]=b.filter;R[a]=b.stemmer;return this};n.encode=function(a,b){return F[a](b)};n.prototype.init=function(a,b){this.j=[];if(b){var c=b.preset;a=b}else a||(a=B),c=a.preset;b={};this.b=a.tokenize||b.b||this.b||B.b;this.split=J(c=a.split)?this.split|| | ||
B.split:E(c)?t(c):c;this.i=a.rtl||this.i||B.i;this.threshold=J(c=a.threshold)?b.threshold||this.threshold||B.threshold:c;this.a=J(c=a.resolution)?c=b.a||this.a||B.a:c;c<=this.threshold&&(this.a=this.threshold+1);this.depth="strict"!==this.b||J(c=a.depth)?b.depth||this.depth||B.depth:c;this.g=(c=J(c=a.encode)?b.encode||B.encode:c)&&F[c]&&F[c].bind(F)||(H(c)?c:this.g||!1);(c=a.matcher)&&this.addMatcher(c);if(c=(b=a.lang)||a.filter){E(c)&&(c=Q[c]);if(c.constructor===Array){{var g=this.g;const h=y(); | ||
for(let f=0;f<c.length;f++){const e=g?g(c[f]):c[f];h[e]=1}c=h}}this.filter=c}if(c=b||a.stemmer){var d;a=E(c)?R[c]:c;b=this.g;c=[];for(d in a)a.hasOwnProperty(d)&&(g=b?b(d):d,c.push(t(g+"($|\\W)"),b?b(a[d]):a[d]));this.stemmer=d=c}this.h=P(this.a-(this.threshold||0));this.f=y();this.c=y();return this};n.prototype.encode=function(a){a&&(O.length&&(a=K(a,O)),this.j.length&&(a=K(a,this.j)),this.g&&(a=this.g(a)),this.stemmer&&(a=K(a,this.stemmer)));return a};n.prototype.addMatcher=function(a){const b= | ||
this.j;for(const c in a)a.hasOwnProperty(c)&&b.push(t(c),a[c]);return this};n.prototype.add=function(a,b,c,g,d){if(b&&E(b)&&(a||0===a)){const u="@"+a;if(this.c[u]&&!g)return this.update(a,b);if(!d&&c)return this.add(a,b,null,g,!0),c(),this;b=this.encode(b);if(!b.length)return this;c=this.b;b=H(c)?c(b):b.split(this.split);this.filter&&(b=C(b,this.filter));g=y();g._ctx=y();d=b.length;const r=this.threshold,v=this.depth,w=this.a,p=this.h,m=this.i;for(let q=0;q<d;q++){var h=b[q];if(h){var f=h.length, | ||
e=(m?q+1:d-q)/d,k="";switch(c){case "reverse":case "both":for(var l=f;--l;)k=h[l]+k,I(p,g,k,a,m?1:(f-l)/f,e,r,w-1);k="";case "forward":for(l=0;l<f;l++)k+=h[l],I(p,g,k,a,m?(l+1)/f:1,e,r,w-1);break;case "full":for(l=0;l<f;l++){const G=(m?l+1:f-l)/f;for(let x=f;x>l;x--)k=h.substring(l,x),I(p,g,k,a,G,e,r,w-1)}break;default:if(f=I(p,g,h,a,1,e,r,w-1),v&&1<d&&f>=r)for(f=g._ctx[h]||(g._ctx[h]=y()),h=this.f[h]||(this.f[h]=P(w-(r||0))),e=q-v,k=q+v+1,0>e&&(e=0),k>d&&(k=d);e<k;e++)e!==q&&I(h,f,b[e],a,0,w-(e< | ||
q?q-e:e-q),r,w-1)}}}this.c[u]=1}return this};n.prototype.update=function(a,b,c){this.c["@"+a]&&E(b)&&(this.remove(a),this.add(a,b,c,!0));return this};n.prototype.remove=function(a,b,c){const g="@"+a;if(this.c[g]){if(!c&&b)return this.remove(a,null,!0),b(),this;for(b=0;b<this.a-(this.threshold||0);b++)M(this.h[b],a);this.depth&&M(this.f,a);delete this.c[g]}return this};n.prototype.search=function(a,b,c,g){b&&H(b)?(c=b,b=1E3):b||0===b||(b=1E3);var d=[],h=a;if("object"===typeof a){var f=!1;b=a.limit; | ||
var e=a.threshold;var k=!1;a=a.query}e||(e=this.threshold||0);if(!g&&c)return c(this.search(h,b,null,!0)),this;if(!a||!E(a))return d;h=this.encode(a);if(!h.length)return d;a=this.b;a=H(a)?a(h):h.split(this.split);this.filter&&(a=C(a,this.filter));c=a.length;g=!0;h=[];var l=y(),u,r=0;1<c&&(this.depth&&"strict"===this.b?u=!0:a.sort(U));var v;if(!u||(v=this.f))for(var w=this.a;r<c;r++){var p=a[r];if(p){if(u){if(!m)if(v[p]){var m=p;l[p]=1}else if(!k)return d;if(k&&r===c-1&&!h.length)u=!1,p=m||p,l[p]= | ||
0;else if(!m)continue}if(!l[p]){var q=[],G=!1;let z=0;if(m=u?v[m]:this.h){let S;for(let L=0;L<w-e;L++)if(S=m[L]&&m[L][p])q[z++]=S,G=!0}if(G)m=p,h[h.length]=1<z?q.concat.apply([],q):q[0];else{g=!1;break}l[p]=1}}}else g=!1;if(g)a:{let z;d=[];!0===f?(f="0",e=""):e=f&&f.split(":");k=h.length;if(1<k){u=y();m=0;w=!0;g=0;var x;for(e&&(2===e.length?e=!1:e=x=parseInt(e[0],10));m<k;m++){l=m===k-1;v=h[m];c=v.length;if(!c){d=N(f,z,v);break a}if(w)if(A){r=A.length;for(a=0;a<r;a++)u["@"+A[a]]=1;var A=null;w=!1}else{A= | ||
v;continue}p=!1;for(a=0;a<c;a++)if(r=v[a],q="@"+r,(G=u[q]||0)&&G===m){if(l){if(!x||--x<g)if(d[g++]=r,b&&g===b){d=N(f,g+(e||0),d);break a}}else u[q]=m+1;p=!0}if(!p)break}A&&(d=A)}else k&&(d=h[0],e&&(e=parseInt(e[0],10)));b&&(A=d.length,e&&e>A&&(e=0),x=e||0,z=x+b,z<A?d=d.slice(x,z):(z=0,x&&(d=d.slice(x))));d=N(f,z,d)}return d};n.prototype.clear=function(){return this.destroy().init()};n.prototype.destroy=function(){this.h=this.f=this.c=null;return this};(function(){const a=t("\\s+"),b=t("[^a-z0-9 ]"), | ||
c=[t("[-/]")," ",b,"",a," "];return function(g){{g=K(g.toLowerCase(),c);let h="",f="";var d="";for(let e=0;e<g.length;e++){const k=g[e];if(k!==f)if(e&&"h"===k){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===f||"e"===f||"i"===f||"o"===f||"u"===f||"y"===f)&&d||" "===f)h+=k}else h+=k;d=e===g.length-1?"":g[e+1];f=k}g=h}return g}})();const F={icase:function(a){return a.toLowerCase()}};return n}(!1),this); |
/* | ||
FlexSearch v0.6.24 | ||
FlexSearch v0.6.30 | ||
Copyright 2019 Nextapps GmbH | ||
@@ -8,36 +8,36 @@ Author: Thomas Wilkerling | ||
*/ | ||
'use strict';(function(J,R,w){let K;(K=w.define)&&K.amd?K([],function(){return R}):(K=w.modules)?K[J.toLowerCase()]=R:"object"===typeof exports?module.exports=R:w[J]=R})("FlexSearch",function ma(J){function w(a,c){const b=c?c.id:a&&a.id;this.id=b||0===b?b:na++;this.init(a,c);fa(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)});fa(this,"length",function(){return this.index.length})}function K(a,c,b,d){this.u!==this.g&&(this.o=this.o.concat(b),this.u++, | ||
d&&this.o.length>=d&&(this.u=this.g),this.u===this.g&&(this.cache&&this.l.set(c,this.o),this.F&&this.F(this.o)));return this}function S(a){const c=B();for(const b in a)if(a.hasOwnProperty(b)){const d=a[b];F(d)?c[b]=d.slice(0):H(d)?c[b]=S(d):c[b]=d}return c}function W(a,c){const b=a.length,d=O(c),e=[];for(let f=0,g=0;f<b;f++){const k=a[f];if(d&&c(k)||!d&&!c[k])e[g++]=k}return e}function P(a,c,b,d,e,f,g,k,h,m){b=ha(b,g?0:e,k,f,c,h,m);let n;k&&(k=b.page,n=b.next,b=b.result);if(g)c=this.where(g,null, | ||
e,b);else{c=b;b=this.i;e=c.length;f=Array(e);for(g=0;g<e;g++)f[g]=b[c[g]];c=f}b=c;d&&(O(d)||(L=d.split(":"),1<L.length?d=oa:(L=L[0],d=pa)),b.sort(d));b=T(k,n,b);this.cache&&this.l.set(a,b);return b}function fa(a,c,b){Object.defineProperty(a,c,{get:b})}function r(a){return new RegExp(a,"g")}function Q(a,c){for(let b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a}function V(a,c,b,d,e,f,g,k){if(c[b])return c[b];e=e?(k-(g||k/1.5))*f+(g||k/1.5)*e:f;c[b]=e;e>=g&&(a=a[k-(e+.5>>0)],a=a[b]||(a[b]=[]), | ||
a[a.length]=d);return e}function ba(a,c){if(a){const b=Object.keys(a);for(let d=0,e=b.length;d<e;d++){const f=b[d],g=a[f];if(g)for(let k=0,h=g.length;k<h;k++)if(g[k]===c){1===h?delete a[f]:g.splice(k,1);break}else H(g[k])&&ba(g[k],c)}}}function ca(a){let c="",b="";var d="";for(let e=0;e<a.length;e++){const f=a[e];if(f!==b)if(e&&"h"===f){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===b||"e"===b||"i"===b||"o"===b||"u"===b||"y"===b)&&d||" "===b)c+=f}else c+=f;d=e===a.length-1?"":a[e+ | ||
1];b=f}return c}function qa(a,c){a=a.length-c.length;return 0>a?1:a?-1:0}function pa(a,c){a=a[L];c=c[L];return a<c?-1:a>c?1:0}function oa(a,c){const b=L.length;for(let d=0;d<b;d++)a=a[L[d]],c=c[L[d]];return a<c?-1:a>c?1:0}function T(a,c,b){return a?{page:a,next:c?""+c:null,result:b}:b}function ha(a,c,b,d,e,f,g){let k,h=[];if(!0===b){b="0";var m=""}else m=b&&b.split(":");const n=a.length;if(1<n){const y=B(),t=[];let v,x;var p=0,l;let I;var u=!0;let D,E=0,N,da,X,ea;m&&(2===m.length?(X=m,m=!1):m=ea= | ||
parseInt(m[0],10));if(g){for(v=B();p<n;p++)if("not"===e[p])for(x=a[p],I=x.length,l=0;l<I;l++)v["@"+x[l]]=1;else da=p+1;if(C(da))return T(b,k,h);p=0}else N=M(e)&&e;let Y;for(;p<n;p++){const ra=p===(da||n)-1;if(!N||!p)if((l=N||e&&e[p])&&"and"!==l)if("or"===l)Y=!1;else continue;else Y=f=!0;x=a[p];if(I=x.length){if(u)if(D){var q=D.length;for(l=0;l<q;l++){u=D[l];var A="@"+u;g&&v[A]||(y[A]=1,f||(h[E++]=u))}D=null;u=!1}else{D=x;continue}A=!1;for(l=0;l<I;l++){q=x[l];var z="@"+q;const Z=f?y[z]||0:p;if(!(!Z&& | ||
!d||g&&v[z]||!f&&y[z]))if(Z===p){if(ra){if(!ea||--ea<E)if(h[E++]=q,c&&E===c)return T(b,E+(m||0),h)}else y[z]=p+1;A=!0}else d&&(z=t[Z]||(t[Z]=[]),z[z.length]=q)}if(Y&&!A&&!d)break}else if(Y&&!d)return T(b,k,x)}if(D)if(p=D.length,g)for(l=m?parseInt(m,10):0;l<p;l++)a=D[l],v["@"+a]||(h[E++]=a);else h=D;if(d)for(E=h.length,X?(p=parseInt(X[0],10)+1,l=parseInt(X[1],10)+1):(p=t.length,l=0);p--;)if(q=t[p]){for(I=q.length;l<I;l++)if(d=q[l],!g||!v["@"+d])if(h[E++]=d,c&&E===c)return T(b,p+":"+l,h);l=0}}else!n|| | ||
e&&"not"===e[0]||(h=a[0],m&&(m=parseInt(m[0],10)));c&&(g=h.length,m&&m>g&&(m=0),m=m||0,k=m+c,k<g?h=h.slice(m,k):(k=0,m&&(h=h.slice(m))));return T(b,k,h)}function M(a){return"string"===typeof a}function F(a){return a.constructor===Array}function O(a){return"function"===typeof a}function H(a){return"object"===typeof a}function C(a){return"undefined"===typeof a}function ia(a){const c=Array(a);for(let b=0;b<a;b++)c[b]=B();return c}function B(){return Object.create(null)}function sa(){let a,c;self.onmessage= | ||
'use strict';(function(K,R,w){let L;(L=w.define)&&L.amd?L([],function(){return R}):(L=w.modules)?L[K.toLowerCase()]=R:"object"===typeof exports?module.exports=R:w[K]=R})("FlexSearch",function ma(K){function w(a,c){const b=c?c.id:a&&a.id;this.id=b||0===b?b:na++;this.init(a,c);fa(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)});fa(this,"length",function(){return this.index.length})}function L(a,c,b,d){this.u!==this.g&&(this.o=this.o.concat(b),this.u++, | ||
d&&this.o.length>=d&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(c,this.o),this.F&&this.F(this.o)));return this}function S(a){const c=B();for(const b in a)if(a.hasOwnProperty(b)){const d=a[b];F(d)?c[b]=d.slice(0):G(d)?c[b]=S(d):c[b]=d}return c}function W(a,c){const b=a.length,d=O(c),e=[];for(let g=0,f=0;g<b;g++){const h=a[g];if(d&&c(h)||!d&&!c[h])e[f++]=h}return e}function P(a,c,b,d,e,g,f,h,k,l){b=ha(b,f?0:e,h,g,c,k,l);let n;h&&(h=b.page,n=b.next,b=b.result);if(f)c=this.where(f,null, | ||
e,b);else{c=b;b=this.l;e=c.length;g=Array(e);for(f=0;f<e;f++)g[f]=b[c[f]];c=g}b=c;d&&(O(d)||(M=d.split(":"),1<M.length?d=oa:(M=M[0],d=pa)),b.sort(d));b=T(h,n,b);this.cache&&this.j.set(a,b);return b}function fa(a,c,b){Object.defineProperty(a,c,{get:b})}function r(a){return new RegExp(a,"g")}function Q(a,c){for(let b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a}function V(a,c,b,d,e,g,f,h){if(c[b])return c[b];e=e?(h-(f||h/1.5))*g+(f||h/1.5)*e:g;c[b]=e;e>=f&&(a=a[h-(e+.5>>0)],a=a[b]||(a[b]=[]), | ||
a[a.length]=d);return e}function ba(a,c){if(a){const b=Object.keys(a);for(let d=0,e=b.length;d<e;d++){const g=b[d],f=a[g];if(f)for(let h=0,k=f.length;h<k;h++)if(f[h]===c){1===k?delete a[g]:f.splice(h,1);break}else G(f[h])&&ba(f[h],c)}}}function ca(a){let c="",b="";var d="";for(let e=0;e<a.length;e++){const g=a[e];if(g!==b)if(e&&"h"===g){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===b||"e"===b||"i"===b||"o"===b||"u"===b||"y"===b)&&d||" "===b)c+=g}else c+=g;d=e===a.length-1?"":a[e+ | ||
1];b=g}return c}function qa(a,c){a=a.length-c.length;return 0>a?1:a?-1:0}function pa(a,c){a=a[M];c=c[M];return a<c?-1:a>c?1:0}function oa(a,c){const b=M.length;for(let d=0;d<b;d++)a=a[M[d]],c=c[M[d]];return a<c?-1:a>c?1:0}function T(a,c,b){return a?{page:a,next:c?""+c:null,result:b}:b}function ha(a,c,b,d,e,g,f){let h,k=[];if(!0===b){b="0";var l=""}else l=b&&b.split(":");const n=a.length;if(1<n){const y=B(),t=[];let v,x;var p=0,m;let I;var u=!0;let D,E=0,N,da,X,ea;l&&(2===l.length?(X=l,l=!1):l=ea= | ||
parseInt(l[0],10));if(f){for(v=B();p<n;p++)if("not"===e[p])for(x=a[p],I=x.length,m=0;m<I;m++)v["@"+x[m]]=1;else da=p+1;if(C(da))return T(b,h,k);p=0}else N=J(e)&&e;let Y;for(;p<n;p++){const ra=p===(da||n)-1;if(!N||!p)if((m=N||e&&e[p])&&"and"!==m)if("or"===m)Y=!1;else continue;else Y=g=!0;x=a[p];if(I=x.length){if(u)if(D){var q=D.length;for(m=0;m<q;m++){u=D[m];var A="@"+u;f&&v[A]||(y[A]=1,g||(k[E++]=u))}D=null;u=!1}else{D=x;continue}A=!1;for(m=0;m<I;m++){q=x[m];var z="@"+q;const Z=g?y[z]||0:p;if(!(!Z&& | ||
!d||f&&v[z]||!g&&y[z]))if(Z===p){if(ra){if(!ea||--ea<E)if(k[E++]=q,c&&E===c)return T(b,E+(l||0),k)}else y[z]=p+1;A=!0}else d&&(z=t[Z]||(t[Z]=[]),z[z.length]=q)}if(Y&&!A&&!d)break}else if(Y&&!d)return T(b,h,x)}if(D)if(p=D.length,f)for(m=l?parseInt(l,10):0;m<p;m++)a=D[m],v["@"+a]||(k[E++]=a);else k=D;if(d)for(E=k.length,X?(p=parseInt(X[0],10)+1,m=parseInt(X[1],10)+1):(p=t.length,m=0);p--;)if(q=t[p]){for(I=q.length;m<I;m++)if(d=q[m],!f||!v["@"+d])if(k[E++]=d,c&&E===c)return T(b,p+":"+m,k);m=0}}else!n|| | ||
e&&"not"===e[0]||(k=a[0],l&&(l=parseInt(l[0],10)));c&&(f=k.length,l&&l>f&&(l=0),l=l||0,h=l+c,h<f?k=k.slice(l,h):(h=0,l&&(k=k.slice(l))));return T(b,h,k)}function J(a){return"string"===typeof a}function F(a){return a.constructor===Array}function O(a){return"function"===typeof a}function G(a){return"object"===typeof a}function C(a){return"undefined"===typeof a}function ia(a){const c=Array(a);for(let b=0;b<a;b++)c[b]=B();return c}function B(){return Object.create(null)}function sa(){let a,c;self.onmessage= | ||
function(b){if(b=b.data)if(b.search){const d=c.search(b.content,b.threshold?{limit:b.limit,threshold:b.threshold,where:b.where}:b.limit);self.postMessage({id:a,content:b.content,limit:b.limit,result:d})}else b.add?c.add(b.id,b.content):b.update?c.update(b.id,b.content):b.remove?c.remove(b.id):b.clear?c.clear():b.info?(b=c.info(),b.worker=a,console.log(b)):b.register&&(a=b.id,b.options.cache=!1,b.options.async=!1,b.options.worker=!1,c=(new Function(b.register.substring(b.register.indexOf("{")+1,b.register.lastIndexOf("}"))))(), | ||
c=new c(b.options))}}function ta(a,c,b,d){a=J("flexsearch","id"+a,sa,function(f){(f=f.data)&&f.result&&d(f.id,f.content,f.result,f.limit,f.where,f.cursor,f.suggest)},c);const e=ma.toString();b.id=c;a.postMessage({register:e,options:b,id:c});return a}const G={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},ja={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1, | ||
c=new c(b.options))}}function ta(a,c,b,d){a=K("flexsearch","id"+a,sa,function(g){(g=g.data)&&g.result&&d(g.id,g.content,g.result,g.limit,g.where,g.cursor,g.suggest)},c);const e=ma.toString();b.id=c;a.postMessage({register:e,options:b,id:c});return a}const H={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},ja={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1, | ||
b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},aa=[];let na=0;const ka={},la={};w.create=function(a,c){return new w(a,c)};w.registerMatcher=function(a){for(const c in a)a.hasOwnProperty(c)&&aa.push(r(c),a[c]);return this};w.registerEncoder=function(a,c){U[a]=c.bind(U);return this};w.registerLanguage=function(a,c){ka[a]=c.filter;la[a]=c.stemmer;return this};w.encode= | ||
function(a,c){return U[a](c)};w.prototype.init=function(a,c){this.v=[];if(c){var b=c.preset;a=c}else a||(a=G),b=a.preset;c={};M(a)?(c=ja[a],a={}):b&&(c=ja[b]);if(b=a.worker)if("undefined"===typeof Worker)a.worker=!1,this.m=null;else{var d=parseInt(b,10)||4;this.C=-1;this.u=0;this.o=[];this.F=null;this.m=Array(d);for(var e=0;e<d;e++)this.m[e]=ta(this.id,e,a,K.bind(this))}this.f=a.tokenize||c.f||this.f||G.f;this.split=a.split||this.split||G.split;this.D=a.rtl||this.D||G.D;this.async="undefined"===typeof Promise|| | ||
C(b=a.async)?this.async||G.async:b;this.g=C(b=a.worker)?this.g||G.g:b;this.threshold=C(b=a.threshold)?c.threshold||this.threshold||G.threshold:b;this.b=C(b=a.resolution)?b=c.b||this.b||G.b:b;b<=this.threshold&&(this.b=this.threshold+1);this.depth="strict"!==this.f||C(b=a.depth)?c.depth||this.depth||G.depth:b;this.w=(b=C(b=a.encode)?c.encode||G.encode:b)&&U[b]&&U[b].bind(U)||(O(b)?b:this.w||!1);(b=a.matcher)&&this.addMatcher(b);if(b=(c=a.lang)||a.filter){M(b)&&(b=ka[b]);if(F(b)){d=this.w;e=B();for(var f= | ||
0;f<b.length;f++){var g=d?d(b[f]):b[f];e[g]=1}b=e}this.filter=b}if(b=c||a.stemmer){var k;c=M(b)?la[b]:b;d=this.w;e=[];for(k in c)c.hasOwnProperty(k)&&(f=d?d(k):k,e.push(r(f+"($|\\W)"),d?d(c[k]):c[k]));this.stemmer=k=e}this.a=e=(b=a.doc)?S(b):this.a||G.a;this.j=ia(this.b-(this.threshold||0));this.h=B();this.c=B();if(e){this.i=B();a.doc=null;k=e.index={};c=e.keys=[];d=e.field;f=e.tag;F(e.id)||(e.id=e.id.split(":"));if(f){this.G=B();g=B();if(d)if(M(d))g[d]=a;else if(F(d))for(let h=0;h<d.length;h++)g[d[h]]= | ||
a;else H(d)&&(g=d);F(f)||(e.tag=f=[f]);for(d=0;d<f.length;d++)this.G[f[d]]=B();this.I=f;d=g}if(d){let h;F(d)||(H(d)?(h=d,e.field=d=Object.keys(d)):e.field=d=[d]);for(e=0;e<d.length;e++)f=d[e],F(f)||(h&&(a=h[f]),c[e]=f,d[e]=f.split(":")),k[f]=new w(a),k[f].i=this.i}}this.B=!0;this.l=(this.cache=b=C(b=a.cache)?this.cache||G.cache:b)?new ua(b):!1;return this};w.prototype.encode=function(a){a&&aa.length&&(a=Q(a,aa));a&&this.v.length&&(a=Q(a,this.v));a&&this.w&&(a=this.w(a));a&&this.stemmer&&(a=Q(a,this.stemmer)); | ||
return a};w.prototype.addMatcher=function(a){const c=this.v;for(const b in a)a.hasOwnProperty(b)&&c.push(r(b),a[b]);return this};w.prototype.add=function(a,c,b,d,e){if(this.a&&H(a))return this.A("add",a,c);if(c&&M(c)&&(a||0===a)){var f="@"+a;if(this.c[f]&&!d)return this.update(a,c);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:a,content:c}),this.c[f]=""+this.C,b&&b(),this;if(!e){if(this.async&&"function"!==typeof importScripts){let t=this;f=new Promise(function(v){setTimeout(function(){t.add(a, | ||
c,null,d,!0);t=null;v()})});if(b)f.then(b);else return f;return this}if(b)return this.add(a,c,null,d,!0),b(),this}c=this.encode(c);if(!c.length)return this;b=this.f;e=O(b)?b(c):c.split(this.split);this.filter&&(e=W(e,this.filter));const p=B();p._ctx=B();const l=e.length,u=this.threshold,q=this.depth,A=this.b,z=this.j,y=this.D;for(let t=0;t<l;t++){var g=e[t];if(g){var k=g.length,h=(y?t+1:l-t)/l,m="";switch(b){case "reverse":case "both":for(var n=k;--n;)m=g[n]+m,V(z,p,m,a,y?1:(k-n)/k,h,u,A-1);m=""; | ||
case "forward":for(n=0;n<k;n++)m+=g[n],V(z,p,m,a,y?(n+1)/k:1,h,u,A-1);break;case "full":for(n=0;n<k;n++){const v=(y?n+1:k-n)/k;for(let x=k;x>n;x--)m=g.substring(n,x),V(z,p,m,a,v,h,u,A-1)}break;default:if(k=V(z,p,g,a,1,h,u,A-1),q&&1<l&&k>=u)for(k=p._ctx[g]||(p._ctx[g]=B()),g=this.h[g]||(this.h[g]=ia(A-(u||0))),h=t-q,m=t+q+1,0>h&&(h=0),m>l&&(m=l);h<m;h++)h!==t&&V(g,k,e[h],a,0,A-(h<t?t-h:h-t),u,A-1)}}}this.c[f]=1;this.B=!1}return this};w.prototype.A=function(a,c,b){if(F(c))for(let h=0,m=c.length;h<m;h++){if(h=== | ||
m-1)return this.A(a,c[h],b);this.A(a,c[h])}else{const h=this.a.index,m=this.a.keys;var d=this.a.tag,e=this.a.id;let n;let p;for(var f=0;f<e.length;f++)n=(n||c)[e[f]];if(d){for(e=0;e<d.length;e++){var g=d[e];var k=g.split(":");for(f=0;f<k.length;f++)p=(p||c)[k[f]];p="@"+p}k=this.G[g];k=k[p]||(k[p]=[])}if("remove"===a){delete this.i[n];for(let l=0,u=m.length;l<u;l++){if(l===u-1)return h[m[l]].remove(n,b),this;h[m[l]].remove(n)}}e=this.a.field;k&&(k[k.length]=c);this.i[n]=c;for(let l=0,u=e.length;l< | ||
u;l++){d=e[l];let q;for(g=0;g<d.length;g++)q=(q||c)[d[g]];d=h[m[l]];g="add"===a?d.add:d.update;l===u-1?g.call(d,n,q,b):g.call(d,n,q)}}return this};w.prototype.update=function(a,c,b){if(this.a&&H(a))return this.A("update",a,c);this.c["@"+a]&&M(c)&&(this.remove(a),this.add(a,c,b,!0));return this};w.prototype.remove=function(a,c,b){if(this.a&&H(a))return this.A("remove",a,c);var d="@"+a;if(this.c[d]){if(this.g)return this.m[this.c[d]].postMessage({remove:!0,id:a}),delete this.c[d],c&&c(),this;if(!b){if(this.async&& | ||
"function"!==typeof importScripts){let e=this;d=new Promise(function(f){setTimeout(function(){e.remove(a,null,!0);e=null;f()})});if(c)d.then(c);else return d;return this}if(c)return this.remove(a,null,!0),c(),this}for(c=0;c<this.b-(this.threshold||0);c++)ba(this.j[c],a);this.depth&&ba(this.h,a);delete this.c[d];this.B=!1}return this};let L;w.prototype.search=function(a,c,b,d){if(H(c)){if(F(c))for(var e=0;e<c.length;e++)c[e].query=a;else c.query=a;a=c;c=1E3}else c&&O(c)?(b=c,c=1E3):c||0===c||(c=1E3); | ||
let f=[],g=a;let k,h,m;if(H(a)&&!F(a)){b||(b=a.callback)&&(g.callback=null);h=a.sort;k=a.page;c=a.limit;var n=a.threshold;m=a.suggest;a=a.query}if(this.a){n=this.a.index;const y=g.where;var p=g.bool||"or",l=g.field;let t=p;let v,x;if(l)F(l)||(l=[l]);else if(F(g)){var u=g;l=[];t=[];for(var q=0;q<g.length;q++)d=g[q],e=d.bool||p,l[q]=d.field,t[q]=e,"not"===e?v=!0:"and"===e&&(x=!0)}else l=this.a.keys;p=l.length;for(q=0;q<p;q++)u&&(g=u[q]),k&&!M(g)&&(g.page=null,g.limit=0),f[q]=n[l[q]].search(g,0);if(b)return b(P.call(this, | ||
a,t,f,h,c,m,y,k,x,v));if(this.async){const I=this;return new Promise(function(D){Promise.all(f).then(function(E){D(P.call(I,a,t,E,h,c,m,y,k,x,v))})})}return P.call(this,a,t,f,h,c,m,y,k,x,v)}n||(n=this.threshold||0);if(this.g)for(this.F=b,this.u=0,this.o=[],n=0;n<this.g;n++)this.m[n].postMessage({search:!0,limit:c,content:g});else{if(!d){if(this.async&&"function"!==typeof importScripts){let y=this;n=new Promise(function(t){setTimeout(function(){t(y.search(g,c,null,!0));y=null})});if(b)n.then(b);else return n; | ||
return this}if(b)return b(this.search(g,c,null,!0)),this}if(!a||!M(a))return f;g=a;if(this.cache)if(this.B){if(b=this.l.get(a))return b}else this.l.clear(),this.B=!0;g=this.encode(g);if(!g.length)return f;b=this.f;b=O(b)?b(g):g.split(this.split);this.filter&&(b=W(b,this.filter));u=b.length;d=!0;e=[];var A=B(),z=0;1<u&&(this.depth&&"strict"===this.f?p=!0:b.sort(qa));if(!p||(q=this.h)){const y=this.b;for(;z<u;z++){let t=b[z];if(t){if(p){if(!l)if(q[t])l=t,A[t]=1;else if(!m)return f;if(m&&z===u-1&&!e.length)p= | ||
!1,t=l||t,A[t]=0;else if(!l)continue}if(!A[t]){const v=[];let x=!1,I=0;const D=p?q[l]:this.j;if(D){let E;for(let N=0;N<y-n;N++)if(E=D[N]&&D[N][t])v[I++]=E,x=!0}if(x)l=t,e[e.length]=1<I?v.concat.apply([],v):v[0];else if(!m){d=!1;break}A[t]=1}}}}else d=!1;d&&(f=ha(e,c,k,m));this.cache&&this.l.set(a,f);return f}};w.prototype.find=function(a,c){return this.where(a,c,1)[0]||null};w.prototype.where=function(a,c,b,d){const e=this.i,f=[];let g=0;let k;var h;let m;if(H(a)){b||(b=c);var n=Object.keys(a);var p= | ||
n.length;k=!1;if(1===p&&"id"===n[0])return[e[a.id]];if((h=this.I)&&!d)for(var l=0;l<h.length;l++){var u=h[l],q=a[u];if(!C(q)){m=this.G[u]["@"+q];if(0===--p)return m;n.splice(n.indexOf(u),1);delete a[u];break}}h=Array(p);for(l=0;l<p;l++)h[l]=n[l].split(":")}else{if(O(a)){c=d||Object.keys(e);b=c.length;for(n=0;n<b;n++)p=e[c[n]],a(p)&&(f[g++]=p);return f}if(C(c))return[e[a]];if("id"===a)return[e[c]];n=[a];p=1;h=[a.split(":")];k=!0}d=m||d||Object.keys(e);l=d.length;for(u=0;u<l;u++){q=m?d[u]:e[d[u]];let A= | ||
!0;for(let z=0;z<p;z++){k||(c=a[n[z]]);const y=h[z],t=y.length;let v=q;if(1<t)for(let x=0;x<t;x++)v=v[y[x]];else v=v[y[0]];if(v!==c){A=!1;break}}if(A&&(f[g++]=q,b&&g===b))break}return f};w.prototype.info=function(){if(this.g)for(let a=0;a<this.g;a++)this.m[a].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:aa.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b, | ||
contextual:this.depth&&"strict"===this.f}};w.prototype.clear=function(){return this.destroy().init()};w.prototype.destroy=function(){this.cache&&(this.l.clear(),this.l=null);this.j=this.h=this.c=null;if(this.a){const a=this.a.keys;for(let c=0;c<a.length;c++)this.a.index[a[c]].destroy();this.a=this.i=null}return this};w.prototype.export=function(a){const c=!a||C(a.serialize)||a.serialize;if(this.a){const d=!a||C(a.doc)||a.doc;var b=!a||C(a.index)||a.index;a=[];let e=0;if(b)for(b=this.a.keys;e<b.length;e++){const f= | ||
this.a.index[b[e]];a[e]=[f.j,f.h,Object.keys(f.c)]}d&&(a[e]=this.i)}else a=[this.j,this.h,Object.keys(this.c)];c&&(a=JSON.stringify(a));return a};w.prototype.import=function(a,c){if(!c||C(c.serialize)||c.serialize)a=JSON.parse(a);const b=B();if(this.a){var d=!c||C(c.doc)||c.doc,e=0;if(!c||C(c.index)||c.index){c=this.a.keys;const g=c.length;for(var f=a[0][2];e<f.length;e++)b[f[e]]=1;for(e=0;e<g;e++)f=this.a.index[c[e]],f.j=a[e][0],f.h=a[e][1],f.c=b}d&&(this.i=H(d)?d:a[e])}else{d=a[2];for(e=0;e<d.length;e++)b[d[e]]= | ||
1;this.j=a[0];this.h=a[1];this.c=b}};const va=function(){const a=r("\\s+"),c=r("[^a-z0-9 ]"),b=[r("[-/]")," ",c,"",a," "];return function(d){return ca(Q(d.toLowerCase(),b))}}(),U={icase:function(a){return a.toLowerCase()},simple:function(){const a=r("\\s+"),c=r("[^a-z0-9 ]"),b=r("[-/]"),d=r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=r("[\u00e8\u00e9\u00ea\u00eb]"),f=r("[\u00ec\u00ed\u00ee\u00ef]"),g=r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),k=r("[\u00f9\u00fa\u00fb\u00fc\u0171]"),h=r("[\u00fd\u0177\u00ff]"), | ||
m=r("\u00f1"),n=r("[\u00e7c]"),p=r("\u00df"),l=r(" & "),u=[d,"a",e,"e",f,"i",g,"o",k,"u",h,"y",m,"n",n,"k",p,"s",l," and ",b," ",c,"",a," "];return function(q){q=Q(q.toLowerCase(),u);return" "===q?"":q}}(),advanced:function(){const a=r("ae"),c=r("ai"),b=r("ay"),d=r("ey"),e=r("oe"),f=r("ue"),g=r("ie"),k=r("sz"),h=r("zs"),m=r("ck"),n=r("cc"),p=r("sh"),l=r("th"),u=r("dt"),q=r("ph"),A=r("pf"),z=r("ou"),y=r("uo"),t=[a,"a",c,"ei",b,"ei",d,"ei",e,"o",f,"u",g,"i",k,"s",h,"s",p,"s",m,"k",n,"k",l,"t",u,"t", | ||
q,"f",A,"f",z,"o",y,"u"];return function(v,x){if(!v)return v;v=this.simple(v);2<v.length&&(v=Q(v,t));x||1<v.length&&(v=ca(v));return v}}(),extra:function(){const a=r("p"),c=r("z"),b=r("[cgq]"),d=r("n"),e=r("d"),f=r("[vw]"),g=r("[aeiouy]"),k=[a,"b",c,"s",b,"k",d,"m",e,"t",f,"f",g,""];return function(h){if(!h)return h;h=this.advanced(h,!0);if(1<h.length){h=h.split(" ");for(let m=0;m<h.length;m++){const n=h[m];1<n.length&&(h[m]=n[0]+Q(n.substring(1),k))}h=h.join(" ");h=ca(h)}return h}}(),balance:va}, | ||
ua=function(){function a(c){this.clear();this.H=!0!==c&&c}a.prototype.clear=function(){this.cache=B();this.count=B();this.index=B();this.s=[]};a.prototype.set=function(c,b){if(this.H&&C(this.cache[c])){let d=this.s.length;if(d===this.H){d--;const e=this.s[d];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[c]=d;this.s[d]=c;this.count[c]=-1;this.cache[c]=b;this.get(c)}else this.cache[c]=b};a.prototype.get=function(c){const b=this.cache[c];if(this.H&&b){var d=++this.count[c]; | ||
const f=this.index;let g=f[c];if(0<g){const k=this.s;for(var e=g;this.count[k[--g]]<=d&&-1!==g;);g++;if(g!==e){for(d=e;d>g;d--)e=k[d-1],k[d]=e,f[e]=d;k[g]=c;f[c]=g}}}return b};return a}();return w}(function(){const J={},R="undefined"!==typeof Blob&&"undefined"!==typeof URL&&URL.createObjectURL;return function(w,K,S,W,P){S=R?URL.createObjectURL(new Blob(["("+S.toString()+")()"],{type:"text/javascript"})):w+".min.js";w+="-"+K;J[w]||(J[w]=[]);J[w][P]=new Worker(S);J[w][P].onmessage=W;return J[w][P]}}()), | ||
this); | ||
function(a,c){return U[a](c)};w.prototype.init=function(a,c){this.v=[];if(c){var b=c.preset;a=c}else a||(a=H),b=a.preset;c={};J(a)?(c=ja[a],a={}):b&&(c=ja[b]);if(b=a.worker)if("undefined"===typeof Worker)a.worker=!1,this.m=null;else{var d=parseInt(b,10)||4;this.C=-1;this.u=0;this.o=[];this.F=null;this.m=Array(d);for(var e=0;e<d;e++)this.m[e]=ta(this.id,e,a,L.bind(this))}this.f=a.tokenize||c.f||this.f||H.f;this.split=C(b=a.split)?this.split||H.split:J(b)?r(b):b;this.D=a.rtl||this.D||H.D;this.async= | ||
"undefined"===typeof Promise||C(b=a.async)?this.async||H.async:b;this.g=C(b=a.worker)?this.g||H.g:b;this.threshold=C(b=a.threshold)?c.threshold||this.threshold||H.threshold:b;this.b=C(b=a.resolution)?b=c.b||this.b||H.b:b;b<=this.threshold&&(this.b=this.threshold+1);this.depth="strict"!==this.f||C(b=a.depth)?c.depth||this.depth||H.depth:b;this.w=(b=C(b=a.encode)?c.encode||H.encode:b)&&U[b]&&U[b].bind(U)||(O(b)?b:this.w||!1);(b=a.matcher)&&this.addMatcher(b);if(b=(c=a.lang)||a.filter){J(b)&&(b=ka[b]); | ||
if(F(b)){d=this.w;e=B();for(var g=0;g<b.length;g++){var f=d?d(b[g]):b[g];e[f]=1}b=e}this.filter=b}if(b=c||a.stemmer){var h;c=J(b)?la[b]:b;d=this.w;e=[];for(h in c)c.hasOwnProperty(h)&&(g=d?d(h):h,e.push(r(g+"($|\\W)"),d?d(c[h]):c[h]));this.stemmer=h=e}this.a=e=(b=a.doc)?S(b):this.a||H.a;this.i=ia(this.b-(this.threshold||0));this.h=B();this.c=B();if(e){this.l=B();a.doc=null;h=e.index={};c=e.keys=[];d=e.field;g=e.tag;f=e.store;F(e.id)||(e.id=e.id.split(":"));if(f){var k=B();if(J(f))k[f]=1;else if(F(f))for(let l= | ||
0;l<f.length;l++)k[f[l]]=1;else G(f)&&(k=f);e.store=k}if(g){this.G=B();f=B();if(d)if(J(d))f[d]=a;else if(F(d))for(k=0;k<d.length;k++)f[d[k]]=a;else G(d)&&(f=d);F(g)||(e.tag=g=[g]);for(d=0;d<g.length;d++)this.G[g[d]]=B();this.I=g;d=f}if(d){let l;F(d)||(G(d)?(l=d,e.field=d=Object.keys(d)):e.field=d=[d]);for(e=0;e<d.length;e++)g=d[e],F(g)||(l&&(a=l[g]),c[e]=g,d[e]=g.split(":")),h[g]=new w(a)}a.doc=b}this.B=!0;this.j=(this.cache=b=C(b=a.cache)?this.cache||H.cache:b)?new ua(b):!1;return this};w.prototype.encode= | ||
function(a){a&&(aa.length&&(a=Q(a,aa)),this.v.length&&(a=Q(a,this.v)),this.w&&(a=this.w(a)),this.stemmer&&(a=Q(a,this.stemmer)));return a};w.prototype.addMatcher=function(a){const c=this.v;for(const b in a)a.hasOwnProperty(b)&&c.push(r(b),a[b]);return this};w.prototype.add=function(a,c,b,d,e){if(this.a&&G(a))return this.A("add",a,c);if(c&&J(c)&&(a||0===a)){var g="@"+a;if(this.c[g]&&!d)return this.update(a,c);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:a, | ||
content:c}),this.c[g]=""+this.C,b&&b(),this;if(!e){if(this.async&&"function"!==typeof importScripts){let t=this;g=new Promise(function(v){setTimeout(function(){t.add(a,c,null,d,!0);t=null;v()})});if(b)g.then(b);else return g;return this}if(b)return this.add(a,c,null,d,!0),b(),this}c=this.encode(c);if(!c.length)return this;b=this.f;e=O(b)?b(c):c.split(this.split);this.filter&&(e=W(e,this.filter));const p=B();p._ctx=B();const m=e.length,u=this.threshold,q=this.depth,A=this.b,z=this.i,y=this.D;for(let t= | ||
0;t<m;t++){var f=e[t];if(f){var h=f.length,k=(y?t+1:m-t)/m,l="";switch(b){case "reverse":case "both":for(var n=h;--n;)l=f[n]+l,V(z,p,l,a,y?1:(h-n)/h,k,u,A-1);l="";case "forward":for(n=0;n<h;n++)l+=f[n],V(z,p,l,a,y?(n+1)/h:1,k,u,A-1);break;case "full":for(n=0;n<h;n++){const v=(y?n+1:h-n)/h;for(let x=h;x>n;x--)l=f.substring(n,x),V(z,p,l,a,v,k,u,A-1)}break;default:if(h=V(z,p,f,a,1,k,u,A-1),q&&1<m&&h>=u)for(h=p._ctx[f]||(p._ctx[f]=B()),f=this.h[f]||(this.h[f]=ia(A-(u||0))),k=t-q,l=t+q+1,0>k&&(k=0),l> | ||
m&&(l=m);k<l;k++)k!==t&&V(f,h,e[k],a,0,A-(k<t?t-k:k-t),u,A-1)}}}this.c[g]=1;this.B=!1}return this};w.prototype.A=function(a,c,b){if(F(c)){var d=c.length;if(d--){for(var e=0;e<d;e++)this.A(a,c[e]);return this.A(a,c[d],b)}}else{var g=this.a.index,f=this.a.keys,h=this.a.tag;e=this.a.store;var k;var l=this.a.id;d=c;for(var n=0;n<l.length;n++)d=d[l[n]];if("remove"===a&&(delete this.l[d],l=f.length,l--)){for(c=0;c<l;c++)g[f[c]].remove(d);return g[f[l]].remove(d,b)}if(h){for(k=0;k<h.length;k++){var p=h[k]; | ||
var m=c;l=p.split(":");for(n=0;n<l.length;n++)m=m[l[n]];m="@"+m}k=this.G[p];k=k[m]||(k[m]=[])}l=this.a.field;for(let u=0,q=l.length;u<q;u++){p=l[u];h=c;for(m=0;m<p.length;m++)h=h[p[m]];p=g[f[u]];m="add"===a?p.add:p.update;u===q-1?m.call(p,d,h,b):m.call(p,d,h)}if(e){b=Object.keys(e);a=B();for(g=0;g<b.length;g++)if(f=b[g],e[f]){f=f.split(":");let u,q;for(l=0;l<f.length;l++)h=f[l],q=(q||c)[h],u=(u||a)[h]=q}c=a}k&&(k[k.length]=c);this.l[d]=c}return this};w.prototype.update=function(a,c,b){if(this.a&& | ||
G(a))return this.A("update",a,c);this.c["@"+a]&&J(c)&&(this.remove(a),this.add(a,c,b,!0));return this};w.prototype.remove=function(a,c,b){if(this.a&&G(a))return this.A("remove",a,c);var d="@"+a;if(this.c[d]){if(this.g)return this.m[this.c[d]].postMessage({remove:!0,id:a}),delete this.c[d],c&&c(),this;if(!b){if(this.async&&"function"!==typeof importScripts){let e=this;d=new Promise(function(g){setTimeout(function(){e.remove(a,null,!0);e=null;g()})});if(c)d.then(c);else return d;return this}if(c)return this.remove(a, | ||
null,!0),c(),this}for(c=0;c<this.b-(this.threshold||0);c++)ba(this.i[c],a);this.depth&&ba(this.h,a);delete this.c[d];this.B=!1}return this};let M;w.prototype.search=function(a,c,b,d){if(G(c)){if(F(c))for(var e=0;e<c.length;e++)c[e].query=a;else c.query=a;a=c;c=1E3}else c&&O(c)?(b=c,c=1E3):c||0===c||(c=1E3);let g=[],f=a;let h,k,l;if(G(a)&&!F(a)){b||(b=a.callback)&&(f.callback=null);k=a.sort;h=a.page;c=a.limit;var n=a.threshold;l=a.suggest;a=a.query}if(this.a){n=this.a.index;const y=f.where;var p=f.bool|| | ||
"or",m=f.field;let t=p;let v,x;if(m)F(m)||(m=[m]);else if(F(f)){var u=f;m=[];t=[];for(var q=0;q<f.length;q++)d=f[q],e=d.bool||p,m[q]=d.field,t[q]=e,"not"===e?v=!0:"and"===e&&(x=!0)}else m=this.a.keys;p=m.length;for(q=0;q<p;q++)u&&(f=u[q]),h&&!J(f)&&(f.page=null,f.limit=0),g[q]=n[m[q]].search(f,0);if(b)return b(P.call(this,a,t,g,k,c,l,y,h,x,v));if(this.async){const I=this;return new Promise(function(D){Promise.all(g).then(function(E){D(P.call(I,a,t,E,k,c,l,y,h,x,v))})})}return P.call(this,a,t,g,k, | ||
c,l,y,h,x,v)}n||(n=this.threshold||0);if(this.g)for(this.F=b,this.u=0,this.o=[],n=0;n<this.g;n++)this.m[n].postMessage({search:!0,limit:c,content:f});else{if(!d){if(this.async&&"function"!==typeof importScripts){let y=this;n=new Promise(function(t){setTimeout(function(){t(y.search(f,c,null,!0));y=null})});if(b)n.then(b);else return n;return this}if(b)return b(this.search(f,c,null,!0)),this}if(!a||!J(a))return g;f=a;if(this.cache)if(this.B){if(b=this.j.get(a))return b}else this.j.clear(),this.B=!0; | ||
f=this.encode(f);if(!f.length)return g;b=this.f;b=O(b)?b(f):f.split(this.split);this.filter&&(b=W(b,this.filter));u=b.length;d=!0;e=[];var A=B(),z=0;1<u&&(this.depth&&"strict"===this.f?p=!0:b.sort(qa));if(!p||(q=this.h)){const y=this.b;for(;z<u;z++){let t=b[z];if(t){if(p){if(!m)if(q[t])m=t,A[t]=1;else if(!l)return g;if(l&&z===u-1&&!e.length)p=!1,t=m||t,A[t]=0;else if(!m)continue}if(!A[t]){const v=[];let x=!1,I=0;const D=p?q[m]:this.i;if(D){let E;for(let N=0;N<y-n;N++)if(E=D[N]&&D[N][t])v[I++]=E,x= | ||
!0}if(x)m=t,e[e.length]=1<I?v.concat.apply([],v):v[0];else if(!l){d=!1;break}A[t]=1}}}}else d=!1;d&&(g=ha(e,c,h,l));this.cache&&this.j.set(a,g);return g}};w.prototype.find=function(a,c){return this.where(a,c,1)[0]||null};w.prototype.where=function(a,c,b,d){const e=this.l,g=[];let f=0;let h;var k;let l;if(G(a)){b||(b=c);var n=Object.keys(a);var p=n.length;h=!1;if(1===p&&"id"===n[0])return[e[a.id]];if((k=this.I)&&!d)for(var m=0;m<k.length;m++){var u=k[m],q=a[u];if(!C(q)){l=this.G[u]["@"+q];if(0===--p)return l; | ||
n.splice(n.indexOf(u),1);delete a[u];break}}k=Array(p);for(m=0;m<p;m++)k[m]=n[m].split(":")}else{if(O(a)){c=d||Object.keys(e);b=c.length;for(n=0;n<b;n++)p=e[c[n]],a(p)&&(g[f++]=p);return g}if(C(c))return[e[a]];if("id"===a)return[e[c]];n=[a];p=1;k=[a.split(":")];h=!0}d=l||d||Object.keys(e);m=d.length;for(u=0;u<m;u++){q=l?d[u]:e[d[u]];let A=!0;for(let z=0;z<p;z++){h||(c=a[n[z]]);const y=k[z],t=y.length;let v=q;if(1<t)for(let x=0;x<t;x++)v=v[y[x]];else v=v[y[0]];if(v!==c){A=!1;break}}if(A&&(g[f++]=q, | ||
b&&f===b))break}return g};w.prototype.info=function(){if(this.g)for(let a=0;a<this.g;a++)this.m[a].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:aa.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&"strict"===this.f}};w.prototype.clear=function(){return this.destroy().init()};w.prototype.destroy=function(){this.cache&&(this.j.clear(), | ||
this.j=null);this.i=this.h=this.c=null;if(this.a){const a=this.a.keys;for(let c=0;c<a.length;c++)this.a.index[a[c]].destroy();this.a=this.l=null}return this};w.prototype.export=function(a){const c=!a||C(a.serialize)||a.serialize;if(this.a){const d=!a||C(a.doc)||a.doc;var b=!a||C(a.index)||a.index;a=[];let e=0;if(b)for(b=this.a.keys;e<b.length;e++){const g=this.a.index[b[e]];a[e]=[g.i,g.h,Object.keys(g.c)]}d&&(a[e]=this.l)}else a=[this.i,this.h,Object.keys(this.c)];c&&(a=JSON.stringify(a));return a}; | ||
w.prototype.import=function(a,c){if(!c||C(c.serialize)||c.serialize)a=JSON.parse(a);const b=B();if(this.a){var d=!c||C(c.doc)||c.doc,e=0;if(!c||C(c.index)||c.index){c=this.a.keys;const f=c.length;for(var g=a[0][2];e<g.length;e++)b[g[e]]=1;for(e=0;e<f;e++){g=this.a.index[c[e]];const h=a[e];h&&(g.i=h[0],g.h=h[1],g.c=b)}}d&&(this.l=G(d)?d:a[e])}else{d=a[2];for(e=0;e<d.length;e++)b[d[e]]=1;this.i=a[0];this.h=a[1];this.c=b}};const va=function(){const a=r("\\s+"),c=r("[^a-z0-9 ]"),b=[r("[-/]")," ",c,"", | ||
a," "];return function(d){return ca(Q(d.toLowerCase(),b))}}(),U={icase:function(a){return a.toLowerCase()},simple:function(){const a=r("\\s+"),c=r("[^a-z0-9 ]"),b=r("[-/]"),d=r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=r("[\u00e8\u00e9\u00ea\u00eb]"),g=r("[\u00ec\u00ed\u00ee\u00ef]"),f=r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),h=r("[\u00f9\u00fa\u00fb\u00fc\u0171]"),k=r("[\u00fd\u0177\u00ff]"),l=r("\u00f1"),n=r("[\u00e7c]"),p=r("\u00df"),m=r(" & "),u=[d,"a",e,"e",g,"i",f,"o",h,"u",k,"y",l,"n", | ||
n,"k",p,"s",m," and ",b," ",c,"",a," "];return function(q){q=Q(q.toLowerCase(),u);return" "===q?"":q}}(),advanced:function(){const a=r("ae"),c=r("ai"),b=r("ay"),d=r("ey"),e=r("oe"),g=r("ue"),f=r("ie"),h=r("sz"),k=r("zs"),l=r("ck"),n=r("cc"),p=r("sh"),m=r("th"),u=r("dt"),q=r("ph"),A=r("pf"),z=r("ou"),y=r("uo"),t=[a,"a",c,"ei",b,"ei",d,"ei",e,"o",g,"u",f,"i",h,"s",k,"s",p,"s",l,"k",n,"k",m,"t",u,"t",q,"f",A,"f",z,"o",y,"u"];return function(v,x){if(!v)return v;v=this.simple(v);2<v.length&&(v=Q(v,t)); | ||
x||1<v.length&&(v=ca(v));return v}}(),extra:function(){const a=r("p"),c=r("z"),b=r("[cgq]"),d=r("n"),e=r("d"),g=r("[vw]"),f=r("[aeiouy]"),h=[a,"b",c,"s",b,"k",d,"m",e,"t",g,"f",f,""];return function(k){if(!k)return k;k=this.advanced(k,!0);if(1<k.length){k=k.split(" ");for(let l=0;l<k.length;l++){const n=k[l];1<n.length&&(k[l]=n[0]+Q(n.substring(1),h))}k=k.join(" ");k=ca(k)}return k}}(),balance:va},ua=function(){function a(c){this.clear();this.H=!0!==c&&c}a.prototype.clear=function(){this.cache=B(); | ||
this.count=B();this.index=B();this.s=[]};a.prototype.set=function(c,b){if(this.H&&C(this.cache[c])){let d=this.s.length;if(d===this.H){d--;const e=this.s[d];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[c]=d;this.s[d]=c;this.count[c]=-1;this.cache[c]=b;this.get(c)}else this.cache[c]=b};a.prototype.get=function(c){const b=this.cache[c];if(this.H&&b){var d=++this.count[c];const g=this.index;let f=g[c];if(0<f){const h=this.s;for(var e=f;this.count[h[--f]]<=d&&-1!==f;);f++; | ||
if(f!==e){for(d=e;d>f;d--)e=h[d-1],h[d]=e,g[e]=d;h[f]=c;g[c]=f}}}return b};return a}();return w}(function(){const K={},R="undefined"!==typeof Blob&&"undefined"!==typeof URL&&URL.createObjectURL;return function(w,L,S,W,P){S=R?URL.createObjectURL(new Blob(["("+S.toString()+")()"],{type:"text/javascript"})):w+".min.js";w+="-"+L;K[w]||(K[w]=[]);K[w][P]=new Worker(S);K[w][P].onmessage=W;return K[w][P]}}()),this); |
/* | ||
FlexSearch v0.6.24 | ||
FlexSearch v0.6.30 | ||
Copyright 2019 Nextapps GmbH | ||
@@ -8,32 +8,32 @@ Author: Thomas Wilkerling | ||
*/ | ||
'use strict';(function(w,N,Q){let J;(J=Q.define)&&J.amd?J([],function(){return N}):(J=Q.modules)?J[w.toLowerCase()]=N:"object"===typeof exports?module.exports=N:Q[w]=N})("FlexSearch",function(){function w(a,b){const c=b?b.id:a&&a.id;this.id=c||0===c?c:ja++;this.init(a,b);ca(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].f):Object.keys(this.f)});ca(this,"length",function(){return this.index.length})}function N(a){const b=B();for(const c in a)if(a.hasOwnProperty(c)){const d= | ||
a[c];F(d)?b[c]=d.slice(0):G(d)?b[c]=N(d):b[c]=d}return b}function Q(a,b){const c=a.length,d=O(b),e=[];for(let g=0,f=0;g<c;g++){const k=a[g];if(d&&b(k)||!d&&!b[k])e[f++]=k}return e}function J(a,b,c,d,e,g,f,k,h,m){c=da(c,f?0:e,k,g,b,h,m);let n;k&&(k=c.page,n=c.next,c=c.result);if(f)b=this.where(f,null,e,c);else{b=c;c=this.h;e=b.length;g=Array(e);for(f=0;f<e;f++)g[f]=c[b[f]];b=g}c=b;d&&(O(d)||(K=d.split(":"),1<K.length?d=ka:(K=K[0],d=la)),c.sort(d));c=R(k,n,c);this.cache&&this.j.set(a,c);return c}function ca(a, | ||
b,c){Object.defineProperty(a,b,{get:c})}function r(a){return new RegExp(a,"g")}function P(a,b){for(let c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}function T(a,b,c,d,e,g,f,k){if(b[c])return b[c];e=e?(k-(f||k/1.5))*g+(f||k/1.5)*e:g;b[c]=e;e>=f&&(a=a[k-(e+.5>>0)],a=a[c]||(a[c]=[]),a[a.length]=d);return e}function Y(a,b){if(a){const c=Object.keys(a);for(let d=0,e=c.length;d<e;d++){const g=c[d],f=a[g];if(f)for(let k=0,h=f.length;k<h;k++)if(f[k]===b){1===h?delete a[g]:f.splice(k,1);break}else G(f[k])&& | ||
Y(f[k],b)}}}function Z(a){let b="",c="";var d="";for(let e=0;e<a.length;e++){const g=a[e];if(g!==c)if(e&&"h"===g){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===c||"e"===c||"i"===c||"o"===c||"u"===c||"y"===c)&&d||" "===c)b+=g}else b+=g;d=e===a.length-1?"":a[e+1];c=g}return b}function ma(a,b){a=a.length-b.length;return 0>a?1:a?-1:0}function la(a,b){a=a[K];b=b[K];return a<b?-1:a>b?1:0}function ka(a,b){const c=K.length;for(let d=0;d<c;d++)a=a[K[d]],b=b[K[d]];return a<b?-1:a>b?1:0}function R(a, | ||
b,c){return a?{page:a,next:b?""+b:null,result:c}:c}function da(a,b,c,d,e,g,f){let k,h=[];if(!0===c){c="0";var m=""}else m=c&&c.split(":");const n=a.length;if(1<n){const y=B(),t=[];let v,x;var p=0,l;let H;var u=!0;let D,E=0,M,aa,U,ba;m&&(2===m.length?(U=m,m=!1):m=ba=parseInt(m[0],10));if(f){for(v=B();p<n;p++)if("not"===e[p])for(x=a[p],H=x.length,l=0;l<H;l++)v["@"+x[l]]=1;else aa=p+1;if(C(aa))return R(c,k,h);p=0}else M=L(e)&&e;let V;for(;p<n;p++){const na=p===(aa||n)-1;if(!M||!p)if((l=M||e&&e[p])&& | ||
"and"!==l)if("or"===l)V=!1;else continue;else V=g=!0;x=a[p];if(H=x.length){if(u)if(D){var q=D.length;for(l=0;l<q;l++){u=D[l];var A="@"+u;f&&v[A]||(y[A]=1,g||(h[E++]=u))}D=null;u=!1}else{D=x;continue}A=!1;for(l=0;l<H;l++){q=x[l];var z="@"+q;const W=g?y[z]||0:p;if(!(!W&&!d||f&&v[z]||!g&&y[z]))if(W===p){if(na){if(!ba||--ba<E)if(h[E++]=q,b&&E===b)return R(c,E+(m||0),h)}else y[z]=p+1;A=!0}else d&&(z=t[W]||(t[W]=[]),z[z.length]=q)}if(V&&!A&&!d)break}else if(V&&!d)return R(c,k,x)}if(D)if(p=D.length,f)for(l= | ||
m?parseInt(m,10):0;l<p;l++)a=D[l],v["@"+a]||(h[E++]=a);else h=D;if(d)for(E=h.length,U?(p=parseInt(U[0],10)+1,l=parseInt(U[1],10)+1):(p=t.length,l=0);p--;)if(q=t[p]){for(H=q.length;l<H;l++)if(d=q[l],!f||!v["@"+d])if(h[E++]=d,b&&E===b)return R(c,p+":"+l,h);l=0}}else!n||e&&"not"===e[0]||(h=a[0],m&&(m=parseInt(m[0],10)));b&&(f=h.length,m&&m>f&&(m=0),m=m||0,k=m+b,k<f?h=h.slice(m,k):(k=0,m&&(h=h.slice(m))));return R(c,k,h)}function L(a){return"string"===typeof a}function F(a){return a.constructor===Array} | ||
function O(a){return"function"===typeof a}function G(a){return"object"===typeof a}function C(a){return"undefined"===typeof a}function ea(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=B();return b}function B(){return Object.create(null)}const I={encode:"icase",c:"forward",split:/\W+/,cache:!1,async:!1,C:!1,v:!1,a:!1,b:9,threshold:0,depth:0},fa={memory:{encode:"extra",c:"strict",threshold:0,b:1},speed:{encode:"icase",c:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",c:"full",threshold:1,b:3}, | ||
'use strict';(function(w,N,Q){let K;(K=Q.define)&&K.amd?K([],function(){return N}):(K=Q.modules)?K[w.toLowerCase()]=N:"object"===typeof exports?module.exports=N:Q[w]=N})("FlexSearch",function(){function w(a,b){const c=b?b.id:a&&a.id;this.id=c||0===c?c:ja++;this.init(a,b);ca(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].f):Object.keys(this.f)});ca(this,"length",function(){return this.index.length})}function N(a){const b=B();for(const c in a)if(a.hasOwnProperty(c)){const d= | ||
a[c];F(d)?b[c]=d.slice(0):G(d)?b[c]=N(d):b[c]=d}return b}function Q(a,b){const c=a.length,d=O(b),e=[];for(let g=0,f=0;g<c;g++){const h=a[g];if(d&&b(h)||!d&&!b[h])e[f++]=h}return e}function K(a,b,c,d,e,g,f,h,k,l){c=da(c,f?0:e,h,g,b,k,l);let p;h&&(h=c.page,p=c.next,c=c.result);if(f)b=this.where(f,null,e,c);else{b=c;c=this.i;e=b.length;g=Array(e);for(f=0;f<e;f++)g[f]=c[b[f]];b=g}c=b;d&&(O(d)||(L=d.split(":"),1<L.length?d=ka:(L=L[0],d=la)),c.sort(d));c=R(h,p,c);this.cache&&this.j.set(a,c);return c}function ca(a, | ||
b,c){Object.defineProperty(a,b,{get:c})}function r(a){return new RegExp(a,"g")}function P(a,b){for(let c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}function T(a,b,c,d,e,g,f,h){if(b[c])return b[c];e=e?(h-(f||h/1.5))*g+(f||h/1.5)*e:g;b[c]=e;e>=f&&(a=a[h-(e+.5>>0)],a=a[c]||(a[c]=[]),a[a.length]=d);return e}function Y(a,b){if(a){const c=Object.keys(a);for(let d=0,e=c.length;d<e;d++){const g=c[d],f=a[g];if(f)for(let h=0,k=f.length;h<k;h++)if(f[h]===b){1===k?delete a[g]:f.splice(h,1);break}else G(f[h])&& | ||
Y(f[h],b)}}}function Z(a){let b="",c="";var d="";for(let e=0;e<a.length;e++){const g=a[e];if(g!==c)if(e&&"h"===g){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===c||"e"===c||"i"===c||"o"===c||"u"===c||"y"===c)&&d||" "===c)b+=g}else b+=g;d=e===a.length-1?"":a[e+1];c=g}return b}function ma(a,b){a=a.length-b.length;return 0>a?1:a?-1:0}function la(a,b){a=a[L];b=b[L];return a<b?-1:a>b?1:0}function ka(a,b){const c=L.length;for(let d=0;d<c;d++)a=a[L[d]],b=b[L[d]];return a<b?-1:a>b?1:0}function R(a, | ||
b,c){return a?{page:a,next:b?""+b:null,result:c}:c}function da(a,b,c,d,e,g,f){let h,k=[];if(!0===c){c="0";var l=""}else l=c&&c.split(":");const p=a.length;if(1<p){const y=B(),t=[];let v,x;var n=0,m;let H;var u=!0;let D,E=0,M,aa,U,ba;l&&(2===l.length?(U=l,l=!1):l=ba=parseInt(l[0],10));if(f){for(v=B();n<p;n++)if("not"===e[n])for(x=a[n],H=x.length,m=0;m<H;m++)v["@"+x[m]]=1;else aa=n+1;if(C(aa))return R(c,h,k);n=0}else M=I(e)&&e;let V;for(;n<p;n++){const na=n===(aa||p)-1;if(!M||!n)if((m=M||e&&e[n])&& | ||
"and"!==m)if("or"===m)V=!1;else continue;else V=g=!0;x=a[n];if(H=x.length){if(u)if(D){var q=D.length;for(m=0;m<q;m++){u=D[m];var A="@"+u;f&&v[A]||(y[A]=1,g||(k[E++]=u))}D=null;u=!1}else{D=x;continue}A=!1;for(m=0;m<H;m++){q=x[m];var z="@"+q;const W=g?y[z]||0:n;if(!(!W&&!d||f&&v[z]||!g&&y[z]))if(W===n){if(na){if(!ba||--ba<E)if(k[E++]=q,b&&E===b)return R(c,E+(l||0),k)}else y[z]=n+1;A=!0}else d&&(z=t[W]||(t[W]=[]),z[z.length]=q)}if(V&&!A&&!d)break}else if(V&&!d)return R(c,h,x)}if(D)if(n=D.length,f)for(m= | ||
l?parseInt(l,10):0;m<n;m++)a=D[m],v["@"+a]||(k[E++]=a);else k=D;if(d)for(E=k.length,U?(n=parseInt(U[0],10)+1,m=parseInt(U[1],10)+1):(n=t.length,m=0);n--;)if(q=t[n]){for(H=q.length;m<H;m++)if(d=q[m],!f||!v["@"+d])if(k[E++]=d,b&&E===b)return R(c,n+":"+m,k);m=0}}else!p||e&&"not"===e[0]||(k=a[0],l&&(l=parseInt(l[0],10)));b&&(f=k.length,l&&l>f&&(l=0),l=l||0,h=l+b,h<f?k=k.slice(l,h):(h=0,l&&(k=k.slice(l))));return R(c,h,k)}function I(a){return"string"===typeof a}function F(a){return a.constructor===Array} | ||
function O(a){return"function"===typeof a}function G(a){return"object"===typeof a}function C(a){return"undefined"===typeof a}function ea(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=B();return b}function B(){return Object.create(null)}const J={encode:"icase",c:"forward",split:/\W+/,cache:!1,async:!1,C:!1,v:!1,a:!1,b:9,threshold:0,depth:0},fa={memory:{encode:"extra",c:"strict",threshold:0,b:1},speed:{encode:"icase",c:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",c:"full",threshold:1,b:3}, | ||
score:{encode:"extra",c:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",c:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",c:"strict",threshold:8,b:9,depth:1}},X=[];let ja=0;const ha={},ia={};w.create=function(a,b){return new w(a,b)};w.registerMatcher=function(a){for(const b in a)a.hasOwnProperty(b)&&X.push(r(b),a[b]);return this};w.registerEncoder=function(a,b){S[a]=b.bind(S);return this};w.registerLanguage=function(a,b){ha[a]=b.filter;ia[a]=b.stemmer;return this};w.encode=function(a, | ||
b){return S[a](b)};w.prototype.init=function(a,b){this.m=[];if(b){var c=b.preset;a=b}else a||(a=I),c=a.preset;b={};L(a)?(b=fa[a],a={}):c&&(b=fa[c]);this.c=a.tokenize||b.c||this.c||I.c;this.split=a.split||this.split||I.split;this.v=a.rtl||this.v||I.v;this.async="undefined"===typeof Promise||C(c=a.async)?this.async||I.async:c;this.threshold=C(c=a.threshold)?b.threshold||this.threshold||I.threshold:c;this.b=C(c=a.resolution)?c=b.b||this.b||I.b:c;c<=this.threshold&&(this.b=this.threshold+1);this.depth= | ||
"strict"!==this.c||C(c=a.depth)?b.depth||this.depth||I.depth:c;this.o=(c=C(c=a.encode)?b.encode||I.encode:c)&&S[c]&&S[c].bind(S)||(O(c)?c:this.o||!1);(c=a.matcher)&&this.addMatcher(c);if(c=(b=a.lang)||a.filter){L(c)&&(c=ha[c]);if(F(c)){var d=this.o,e=B();for(var g=0;g<c.length;g++){var f=d?d(c[g]):c[g];e[f]=1}c=e}this.filter=c}if(c=b||a.stemmer){var k;b=L(c)?ia[c]:c;d=this.o;e=[];for(k in b)b.hasOwnProperty(k)&&(g=d?d(k):k,e.push(r(g+"($|\\W)"),d?d(b[k]):b[k]));this.stemmer=k=e}this.a=e=(c=a.doc)? | ||
N(c):this.a||I.a;this.i=ea(this.b-(this.threshold||0));this.g=B();this.f=B();if(e){this.h=B();a.doc=null;k=e.index={};b=e.keys=[];d=e.field;g=e.tag;F(e.id)||(e.id=e.id.split(":"));if(g){this.w=B();f=B();if(d)if(L(d))f[d]=a;else if(F(d))for(let h=0;h<d.length;h++)f[d[h]]=a;else G(d)&&(f=d);F(g)||(e.tag=g=[g]);for(d=0;d<g.length;d++)this.w[g[d]]=B();this.B=g;d=f}if(d){let h;F(d)||(G(d)?(h=d,e.field=d=Object.keys(d)):e.field=d=[d]);for(e=0;e<d.length;e++)g=d[e],F(g)||(h&&(a=h[g]),b[e]=g,d[e]=g.split(":")), | ||
k[g]=new w(a),k[g].h=this.h}}this.u=!0;this.j=(this.cache=c=C(c=a.cache)?this.cache||I.cache:c)?new oa(c):!1;return this};w.prototype.encode=function(a){a&&X.length&&(a=P(a,X));a&&this.m.length&&(a=P(a,this.m));a&&this.o&&(a=this.o(a));a&&this.stemmer&&(a=P(a,this.stemmer));return a};w.prototype.addMatcher=function(a){const b=this.m;for(const c in a)a.hasOwnProperty(c)&&b.push(r(c),a[c]);return this};w.prototype.add=function(a,b,c,d,e){if(this.a&&G(a))return this.s("add",a,b);if(b&&L(b)&&(a||0=== | ||
a)){var g="@"+a;if(this.f[g]&&!d)return this.update(a,b);if(!e){if(this.async){let t=this;g=new Promise(function(v){setTimeout(function(){t.add(a,b,null,d,!0);t=null;v()})});if(c)g.then(c);else return g;return this}if(c)return this.add(a,b,null,d,!0),c(),this}b=this.encode(b);if(!b.length)return this;c=this.c;e=O(c)?c(b):b.split(this.split);this.filter&&(e=Q(e,this.filter));const p=B();p._ctx=B();const l=e.length,u=this.threshold,q=this.depth,A=this.b,z=this.i,y=this.v;for(let t=0;t<l;t++){var f= | ||
e[t];if(f){var k=f.length,h=(y?t+1:l-t)/l,m="";switch(c){case "reverse":case "both":for(var n=k;--n;)m=f[n]+m,T(z,p,m,a,y?1:(k-n)/k,h,u,A-1);m="";case "forward":for(n=0;n<k;n++)m+=f[n],T(z,p,m,a,y?(n+1)/k:1,h,u,A-1);break;case "full":for(n=0;n<k;n++){const v=(y?n+1:k-n)/k;for(let x=k;x>n;x--)m=f.substring(n,x),T(z,p,m,a,v,h,u,A-1)}break;default:if(k=T(z,p,f,a,1,h,u,A-1),q&&1<l&&k>=u)for(k=p._ctx[f]||(p._ctx[f]=B()),f=this.g[f]||(this.g[f]=ea(A-(u||0))),h=t-q,m=t+q+1,0>h&&(h=0),m>l&&(m=l);h<m;h++)h!== | ||
t&&T(f,k,e[h],a,0,A-(h<t?t-h:h-t),u,A-1)}}}this.f[g]=1;this.u=!1}return this};w.prototype.s=function(a,b,c){if(F(b))for(let h=0,m=b.length;h<m;h++){if(h===m-1)return this.s(a,b[h],c);this.s(a,b[h])}else{const h=this.a.index,m=this.a.keys;var d=this.a.tag,e=this.a.id;let n;let p;for(var g=0;g<e.length;g++)n=(n||b)[e[g]];if(d){for(e=0;e<d.length;e++){var f=d[e];var k=f.split(":");for(g=0;g<k.length;g++)p=(p||b)[k[g]];p="@"+p}k=this.w[f];k=k[p]||(k[p]=[])}if("remove"===a){delete this.h[n];for(let l= | ||
0,u=m.length;l<u;l++){if(l===u-1)return h[m[l]].remove(n,c),this;h[m[l]].remove(n)}}e=this.a.field;k&&(k[k.length]=b);this.h[n]=b;for(let l=0,u=e.length;l<u;l++){d=e[l];let q;for(f=0;f<d.length;f++)q=(q||b)[d[f]];d=h[m[l]];f="add"===a?d.add:d.update;l===u-1?f.call(d,n,q,c):f.call(d,n,q)}}return this};w.prototype.update=function(a,b,c){if(this.a&&G(a))return this.s("update",a,b);this.f["@"+a]&&L(b)&&(this.remove(a),this.add(a,b,c,!0));return this};w.prototype.remove=function(a,b,c){if(this.a&&G(a))return this.s("remove", | ||
a,b);var d="@"+a;if(this.f[d]){if(!c){if(this.async&&"function"!==typeof importScripts){let e=this;d=new Promise(function(g){setTimeout(function(){e.remove(a,null,!0);e=null;g()})});if(b)d.then(b);else return d;return this}if(b)return this.remove(a,null,!0),b(),this}for(b=0;b<this.b-(this.threshold||0);b++)Y(this.i[b],a);this.depth&&Y(this.g,a);delete this.f[d];this.u=!1}return this};let K;w.prototype.search=function(a,b,c,d){if(G(b)){if(F(b))for(var e=0;e<b.length;e++)b[e].query=a;else b.query=a; | ||
a=b;b=1E3}else b&&O(b)?(c=b,b=1E3):b||0===b||(b=1E3);let g=[],f=a;let k,h,m;if(G(a)&&!F(a)){c||(c=a.callback)&&(f.callback=null);h=a.sort;k=a.page;b=a.limit;var n=a.threshold;m=a.suggest;a=a.query}if(this.a){n=this.a.index;const y=f.where;var p=f.bool||"or",l=f.field;let t=p;let v,x;if(l)F(l)||(l=[l]);else if(F(f)){var u=f;l=[];t=[];for(var q=0;q<f.length;q++)d=f[q],e=d.bool||p,l[q]=d.field,t[q]=e,"not"===e?v=!0:"and"===e&&(x=!0)}else l=this.a.keys;p=l.length;for(q=0;q<p;q++)u&&(f=u[q]),k&&!L(f)&& | ||
(f.page=null,f.limit=0),g[q]=n[l[q]].search(f,0);if(c)return c(J.call(this,a,t,g,h,b,m,y,k,x,v));if(this.async){const H=this;return new Promise(function(D){Promise.all(g).then(function(E){D(J.call(H,a,t,E,h,b,m,y,k,x,v))})})}return J.call(this,a,t,g,h,b,m,y,k,x,v)}n||(n=this.threshold||0);if(!d){if(this.async&&"function"!==typeof importScripts){let y=this;n=new Promise(function(t){setTimeout(function(){t(y.search(f,b,null,!0));y=null})});if(c)n.then(c);else return n;return this}if(c)return c(this.search(f, | ||
b,null,!0)),this}if(!a||!L(a))return g;f=a;if(this.cache)if(this.u){if(c=this.j.get(a))return c}else this.j.clear(),this.u=!0;f=this.encode(f);if(!f.length)return g;c=this.c;c=O(c)?c(f):f.split(this.split);this.filter&&(c=Q(c,this.filter));u=c.length;d=!0;e=[];const A=B();let z=0;1<u&&(this.depth&&"strict"===this.c?p=!0:c.sort(ma));if(!p||(q=this.g)){const y=this.b;for(;z<u;z++){let t=c[z];if(t){if(p){if(!l)if(q[t])l=t,A[t]=1;else if(!m)return g;if(m&&z===u-1&&!e.length)p=!1,t=l||t,A[t]=0;else if(!l)continue}if(!A[t]){const v= | ||
[];let x=!1,H=0;const D=p?q[l]:this.i;if(D){let E;for(let M=0;M<y-n;M++)if(E=D[M]&&D[M][t])v[H++]=E,x=!0}if(x)l=t,e[e.length]=1<H?v.concat.apply([],v):v[0];else if(!m){d=!1;break}A[t]=1}}}}else d=!1;d&&(g=da(e,b,k,m));this.cache&&this.j.set(a,g);return g};w.prototype.find=function(a,b){return this.where(a,b,1)[0]||null};w.prototype.where=function(a,b,c,d){const e=this.h,g=[];let f=0;let k;var h;let m;if(G(a)){c||(c=b);var n=Object.keys(a);var p=n.length;k=!1;if(1===p&&"id"===n[0])return[e[a.id]]; | ||
if((h=this.B)&&!d)for(var l=0;l<h.length;l++){var u=h[l],q=a[u];if(!C(q)){m=this.w[u]["@"+q];if(0===--p)return m;n.splice(n.indexOf(u),1);delete a[u];break}}h=Array(p);for(l=0;l<p;l++)h[l]=n[l].split(":")}else{if(O(a)){b=d||Object.keys(e);c=b.length;for(n=0;n<c;n++)p=e[b[n]],a(p)&&(g[f++]=p);return g}if(C(b))return[e[a]];if("id"===a)return[e[b]];n=[a];p=1;h=[a.split(":")];k=!0}d=m||d||Object.keys(e);l=d.length;for(u=0;u<l;u++){q=m?d[u]:e[d[u]];let A=!0;for(let z=0;z<p;z++){k||(b=a[n[z]]);const y= | ||
h[z],t=y.length;let v=q;if(1<t)for(let x=0;x<t;x++)v=v[y[x]];else v=v[y[0]];if(v!==b){A=!1;break}}if(A&&(g[f++]=q,c&&f===c))break}return g};w.prototype.info=function(){return{id:this.id,items:this.length,cache:this.cache&&this.cache.l?this.cache.l.length:!1,matcher:X.length+(this.m?this.m.length:0),worker:this.C,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&"strict"===this.c}};w.prototype.clear=function(){return this.destroy().init()};w.prototype.destroy=function(){this.cache&& | ||
(this.j.clear(),this.j=null);this.i=this.g=this.f=null;if(this.a){const a=this.a.keys;for(let b=0;b<a.length;b++)this.a.index[a[b]].destroy();this.a=this.h=null}return this};w.prototype.export=function(a){const b=!a||C(a.serialize)||a.serialize;if(this.a){const d=!a||C(a.doc)||a.doc;var c=!a||C(a.index)||a.index;a=[];let e=0;if(c)for(c=this.a.keys;e<c.length;e++){const g=this.a.index[c[e]];a[e]=[g.i,g.g,Object.keys(g.f)]}d&&(a[e]=this.h)}else a=[this.i,this.g,Object.keys(this.f)];b&&(a=JSON.stringify(a)); | ||
return a};w.prototype.import=function(a,b){if(!b||C(b.serialize)||b.serialize)a=JSON.parse(a);const c=B();if(this.a){var d=!b||C(b.doc)||b.doc,e=0;if(!b||C(b.index)||b.index){b=this.a.keys;const f=b.length;for(var g=a[0][2];e<g.length;e++)c[g[e]]=1;for(e=0;e<f;e++)g=this.a.index[b[e]],g.i=a[e][0],g.g=a[e][1],g.f=c}d&&(this.h=G(d)?d:a[e])}else{d=a[2];for(e=0;e<d.length;e++)c[d[e]]=1;this.i=a[0];this.g=a[1];this.f=c}};const pa=function(){const a=r("\\s+"),b=r("[^a-z0-9 ]"),c=[r("[-/]")," ",b,"",a," "]; | ||
return function(d){return Z(P(d.toLowerCase(),c))}}(),S={icase:function(a){return a.toLowerCase()},simple:function(){const a=r("\\s+"),b=r("[^a-z0-9 ]"),c=r("[-/]"),d=r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=r("[\u00e8\u00e9\u00ea\u00eb]"),g=r("[\u00ec\u00ed\u00ee\u00ef]"),f=r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),k=r("[\u00f9\u00fa\u00fb\u00fc\u0171]"),h=r("[\u00fd\u0177\u00ff]"),m=r("\u00f1"),n=r("[\u00e7c]"),p=r("\u00df"),l=r(" & "),u=[d,"a",e,"e",g,"i",f,"o",k,"u",h,"y",m,"n",n,"k",p, | ||
"s",l," and ",c," ",b,"",a," "];return function(q){q=P(q.toLowerCase(),u);return" "===q?"":q}}(),advanced:function(){const a=r("ae"),b=r("ai"),c=r("ay"),d=r("ey"),e=r("oe"),g=r("ue"),f=r("ie"),k=r("sz"),h=r("zs"),m=r("ck"),n=r("cc"),p=r("sh"),l=r("th"),u=r("dt"),q=r("ph"),A=r("pf"),z=r("ou"),y=r("uo"),t=[a,"a",b,"ei",c,"ei",d,"ei",e,"o",g,"u",f,"i",k,"s",h,"s",p,"s",m,"k",n,"k",l,"t",u,"t",q,"f",A,"f",z,"o",y,"u"];return function(v,x){if(!v)return v;v=this.simple(v);2<v.length&&(v=P(v,t));x||1<v.length&& | ||
(v=Z(v));return v}}(),extra:function(){const a=r("p"),b=r("z"),c=r("[cgq]"),d=r("n"),e=r("d"),g=r("[vw]"),f=r("[aeiouy]"),k=[a,"b",b,"s",c,"k",d,"m",e,"t",g,"f",f,""];return function(h){if(!h)return h;h=this.advanced(h,!0);if(1<h.length){h=h.split(" ");for(let m=0;m<h.length;m++){const n=h[m];1<n.length&&(h[m]=n[0]+P(n.substring(1),k))}h=h.join(" ");h=Z(h)}return h}}(),balance:pa},oa=function(){function a(b){this.clear();this.A=!0!==b&&b}a.prototype.clear=function(){this.cache=B();this.count=B(); | ||
this.index=B();this.l=[]};a.prototype.set=function(b,c){if(this.A&&C(this.cache[b])){let d=this.l.length;if(d===this.A){d--;const e=this.l[d];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[b]=d;this.l[d]=b;this.count[b]=-1;this.cache[b]=c;this.get(b)}else this.cache[b]=c};a.prototype.get=function(b){const c=this.cache[b];if(this.A&&c){var d=++this.count[b];const g=this.index;let f=g[b];if(0<f){const k=this.l;for(var e=f;this.count[k[--f]]<=d&&-1!==f;);f++;if(f!==e){for(d= | ||
e;d>f;d--)e=k[d-1],k[d]=e,g[e]=d;k[f]=b;g[b]=f}}}return c};return a}();return w}(!1),this); | ||
b){return S[a](b)};w.prototype.init=function(a,b){this.m=[];if(b){var c=b.preset;a=b}else a||(a=J),c=a.preset;b={};I(a)?(b=fa[a],a={}):c&&(b=fa[c]);this.c=a.tokenize||b.c||this.c||J.c;this.split=C(c=a.split)?this.split||J.split:I(c)?r(c):c;this.v=a.rtl||this.v||J.v;this.async="undefined"===typeof Promise||C(c=a.async)?this.async||J.async:c;this.threshold=C(c=a.threshold)?b.threshold||this.threshold||J.threshold:c;this.b=C(c=a.resolution)?c=b.b||this.b||J.b:c;c<=this.threshold&&(this.b=this.threshold+ | ||
1);this.depth="strict"!==this.c||C(c=a.depth)?b.depth||this.depth||J.depth:c;this.o=(c=C(c=a.encode)?b.encode||J.encode:c)&&S[c]&&S[c].bind(S)||(O(c)?c:this.o||!1);(c=a.matcher)&&this.addMatcher(c);if(c=(b=a.lang)||a.filter){I(c)&&(c=ha[c]);if(F(c)){var d=this.o,e=B();for(var g=0;g<c.length;g++){var f=d?d(c[g]):c[g];e[f]=1}c=e}this.filter=c}if(c=b||a.stemmer){var h;b=I(c)?ia[c]:c;d=this.o;e=[];for(h in b)b.hasOwnProperty(h)&&(g=d?d(h):h,e.push(r(g+"($|\\W)"),d?d(b[h]):b[h]));this.stemmer=h=e}this.a= | ||
e=(c=a.doc)?N(c):this.a||J.a;this.h=ea(this.b-(this.threshold||0));this.g=B();this.f=B();if(e){this.i=B();a.doc=null;h=e.index={};b=e.keys=[];d=e.field;g=e.tag;f=e.store;F(e.id)||(e.id=e.id.split(":"));if(f){var k=B();if(I(f))k[f]=1;else if(F(f))for(let l=0;l<f.length;l++)k[f[l]]=1;else G(f)&&(k=f);e.store=k}if(g){this.w=B();f=B();if(d)if(I(d))f[d]=a;else if(F(d))for(k=0;k<d.length;k++)f[d[k]]=a;else G(d)&&(f=d);F(g)||(e.tag=g=[g]);for(d=0;d<g.length;d++)this.w[g[d]]=B();this.B=g;d=f}if(d){let l; | ||
F(d)||(G(d)?(l=d,e.field=d=Object.keys(d)):e.field=d=[d]);for(e=0;e<d.length;e++)g=d[e],F(g)||(l&&(a=l[g]),b[e]=g,d[e]=g.split(":")),h[g]=new w(a)}a.doc=c}this.u=!0;this.j=(this.cache=c=C(c=a.cache)?this.cache||J.cache:c)?new oa(c):!1;return this};w.prototype.encode=function(a){a&&(X.length&&(a=P(a,X)),this.m.length&&(a=P(a,this.m)),this.o&&(a=this.o(a)),this.stemmer&&(a=P(a,this.stemmer)));return a};w.prototype.addMatcher=function(a){const b=this.m;for(const c in a)a.hasOwnProperty(c)&&b.push(r(c), | ||
a[c]);return this};w.prototype.add=function(a,b,c,d,e){if(this.a&&G(a))return this.s("add",a,b);if(b&&I(b)&&(a||0===a)){var g="@"+a;if(this.f[g]&&!d)return this.update(a,b);if(!e){if(this.async){let t=this;g=new Promise(function(v){setTimeout(function(){t.add(a,b,null,d,!0);t=null;v()})});if(c)g.then(c);else return g;return this}if(c)return this.add(a,b,null,d,!0),c(),this}b=this.encode(b);if(!b.length)return this;c=this.c;e=O(c)?c(b):b.split(this.split);this.filter&&(e=Q(e,this.filter));const n= | ||
B();n._ctx=B();const m=e.length,u=this.threshold,q=this.depth,A=this.b,z=this.h,y=this.v;for(let t=0;t<m;t++){var f=e[t];if(f){var h=f.length,k=(y?t+1:m-t)/m,l="";switch(c){case "reverse":case "both":for(var p=h;--p;)l=f[p]+l,T(z,n,l,a,y?1:(h-p)/h,k,u,A-1);l="";case "forward":for(p=0;p<h;p++)l+=f[p],T(z,n,l,a,y?(p+1)/h:1,k,u,A-1);break;case "full":for(p=0;p<h;p++){const v=(y?p+1:h-p)/h;for(let x=h;x>p;x--)l=f.substring(p,x),T(z,n,l,a,v,k,u,A-1)}break;default:if(h=T(z,n,f,a,1,k,u,A-1),q&&1<m&&h>=u)for(h= | ||
n._ctx[f]||(n._ctx[f]=B()),f=this.g[f]||(this.g[f]=ea(A-(u||0))),k=t-q,l=t+q+1,0>k&&(k=0),l>m&&(l=m);k<l;k++)k!==t&&T(f,h,e[k],a,0,A-(k<t?t-k:k-t),u,A-1)}}}this.f[g]=1;this.u=!1}return this};w.prototype.s=function(a,b,c){if(F(b)){var d=b.length;if(d--){for(var e=0;e<d;e++)this.s(a,b[e]);return this.s(a,b[d],c)}}else{var g=this.a.index,f=this.a.keys,h=this.a.tag;e=this.a.store;var k;var l=this.a.id;d=b;for(var p=0;p<l.length;p++)d=d[l[p]];if("remove"===a&&(delete this.i[d],l=f.length,l--)){for(b=0;b< | ||
l;b++)g[f[b]].remove(d);return g[f[l]].remove(d,c)}if(h){for(k=0;k<h.length;k++){var n=h[k];var m=b;l=n.split(":");for(p=0;p<l.length;p++)m=m[l[p]];m="@"+m}k=this.w[n];k=k[m]||(k[m]=[])}l=this.a.field;for(let u=0,q=l.length;u<q;u++){n=l[u];h=b;for(m=0;m<n.length;m++)h=h[n[m]];n=g[f[u]];m="add"===a?n.add:n.update;u===q-1?m.call(n,d,h,c):m.call(n,d,h)}if(e){c=Object.keys(e);a=B();for(g=0;g<c.length;g++)if(f=c[g],e[f]){f=f.split(":");let u,q;for(l=0;l<f.length;l++)h=f[l],q=(q||b)[h],u=(u||a)[h]=q}b= | ||
a}k&&(k[k.length]=b);this.i[d]=b}return this};w.prototype.update=function(a,b,c){if(this.a&&G(a))return this.s("update",a,b);this.f["@"+a]&&I(b)&&(this.remove(a),this.add(a,b,c,!0));return this};w.prototype.remove=function(a,b,c){if(this.a&&G(a))return this.s("remove",a,b);var d="@"+a;if(this.f[d]){if(!c){if(this.async&&"function"!==typeof importScripts){let e=this;d=new Promise(function(g){setTimeout(function(){e.remove(a,null,!0);e=null;g()})});if(b)d.then(b);else return d;return this}if(b)return this.remove(a, | ||
null,!0),b(),this}for(b=0;b<this.b-(this.threshold||0);b++)Y(this.h[b],a);this.depth&&Y(this.g,a);delete this.f[d];this.u=!1}return this};let L;w.prototype.search=function(a,b,c,d){if(G(b)){if(F(b))for(var e=0;e<b.length;e++)b[e].query=a;else b.query=a;a=b;b=1E3}else b&&O(b)?(c=b,b=1E3):b||0===b||(b=1E3);let g=[],f=a;let h,k,l;if(G(a)&&!F(a)){c||(c=a.callback)&&(f.callback=null);k=a.sort;h=a.page;b=a.limit;var p=a.threshold;l=a.suggest;a=a.query}if(this.a){p=this.a.index;const y=f.where;var n=f.bool|| | ||
"or",m=f.field;let t=n;let v,x;if(m)F(m)||(m=[m]);else if(F(f)){var u=f;m=[];t=[];for(var q=0;q<f.length;q++)d=f[q],e=d.bool||n,m[q]=d.field,t[q]=e,"not"===e?v=!0:"and"===e&&(x=!0)}else m=this.a.keys;n=m.length;for(q=0;q<n;q++)u&&(f=u[q]),h&&!I(f)&&(f.page=null,f.limit=0),g[q]=p[m[q]].search(f,0);if(c)return c(K.call(this,a,t,g,k,b,l,y,h,x,v));if(this.async){const H=this;return new Promise(function(D){Promise.all(g).then(function(E){D(K.call(H,a,t,E,k,b,l,y,h,x,v))})})}return K.call(this,a,t,g,k, | ||
b,l,y,h,x,v)}p||(p=this.threshold||0);if(!d){if(this.async&&"function"!==typeof importScripts){let y=this;p=new Promise(function(t){setTimeout(function(){t(y.search(f,b,null,!0));y=null})});if(c)p.then(c);else return p;return this}if(c)return c(this.search(f,b,null,!0)),this}if(!a||!I(a))return g;f=a;if(this.cache)if(this.u){if(c=this.j.get(a))return c}else this.j.clear(),this.u=!0;f=this.encode(f);if(!f.length)return g;c=this.c;c=O(c)?c(f):f.split(this.split);this.filter&&(c=Q(c,this.filter));u= | ||
c.length;d=!0;e=[];const A=B();let z=0;1<u&&(this.depth&&"strict"===this.c?n=!0:c.sort(ma));if(!n||(q=this.g)){const y=this.b;for(;z<u;z++){let t=c[z];if(t){if(n){if(!m)if(q[t])m=t,A[t]=1;else if(!l)return g;if(l&&z===u-1&&!e.length)n=!1,t=m||t,A[t]=0;else if(!m)continue}if(!A[t]){const v=[];let x=!1,H=0;const D=n?q[m]:this.h;if(D){let E;for(let M=0;M<y-p;M++)if(E=D[M]&&D[M][t])v[H++]=E,x=!0}if(x)m=t,e[e.length]=1<H?v.concat.apply([],v):v[0];else if(!l){d=!1;break}A[t]=1}}}}else d=!1;d&&(g=da(e,b, | ||
h,l));this.cache&&this.j.set(a,g);return g};w.prototype.find=function(a,b){return this.where(a,b,1)[0]||null};w.prototype.where=function(a,b,c,d){const e=this.i,g=[];let f=0;let h;var k;let l;if(G(a)){c||(c=b);var p=Object.keys(a);var n=p.length;h=!1;if(1===n&&"id"===p[0])return[e[a.id]];if((k=this.B)&&!d)for(var m=0;m<k.length;m++){var u=k[m],q=a[u];if(!C(q)){l=this.w[u]["@"+q];if(0===--n)return l;p.splice(p.indexOf(u),1);delete a[u];break}}k=Array(n);for(m=0;m<n;m++)k[m]=p[m].split(":")}else{if(O(a)){b= | ||
d||Object.keys(e);c=b.length;for(p=0;p<c;p++)n=e[b[p]],a(n)&&(g[f++]=n);return g}if(C(b))return[e[a]];if("id"===a)return[e[b]];p=[a];n=1;k=[a.split(":")];h=!0}d=l||d||Object.keys(e);m=d.length;for(u=0;u<m;u++){q=l?d[u]:e[d[u]];let A=!0;for(let z=0;z<n;z++){h||(b=a[p[z]]);const y=k[z],t=y.length;let v=q;if(1<t)for(let x=0;x<t;x++)v=v[y[x]];else v=v[y[0]];if(v!==b){A=!1;break}}if(A&&(g[f++]=q,c&&f===c))break}return g};w.prototype.info=function(){return{id:this.id,items:this.length,cache:this.cache&& | ||
this.cache.l?this.cache.l.length:!1,matcher:X.length+(this.m?this.m.length:0),worker:this.C,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&"strict"===this.c}};w.prototype.clear=function(){return this.destroy().init()};w.prototype.destroy=function(){this.cache&&(this.j.clear(),this.j=null);this.h=this.g=this.f=null;if(this.a){const a=this.a.keys;for(let b=0;b<a.length;b++)this.a.index[a[b]].destroy();this.a=this.i=null}return this};w.prototype.export=function(a){const b= | ||
!a||C(a.serialize)||a.serialize;if(this.a){const d=!a||C(a.doc)||a.doc;var c=!a||C(a.index)||a.index;a=[];let e=0;if(c)for(c=this.a.keys;e<c.length;e++){const g=this.a.index[c[e]];a[e]=[g.h,g.g,Object.keys(g.f)]}d&&(a[e]=this.i)}else a=[this.h,this.g,Object.keys(this.f)];b&&(a=JSON.stringify(a));return a};w.prototype.import=function(a,b){if(!b||C(b.serialize)||b.serialize)a=JSON.parse(a);const c=B();if(this.a){var d=!b||C(b.doc)||b.doc,e=0;if(!b||C(b.index)||b.index){b=this.a.keys;const f=b.length; | ||
for(var g=a[0][2];e<g.length;e++)c[g[e]]=1;for(e=0;e<f;e++){g=this.a.index[b[e]];const h=a[e];h&&(g.h=h[0],g.g=h[1],g.f=c)}}d&&(this.i=G(d)?d:a[e])}else{d=a[2];for(e=0;e<d.length;e++)c[d[e]]=1;this.h=a[0];this.g=a[1];this.f=c}};const pa=function(){const a=r("\\s+"),b=r("[^a-z0-9 ]"),c=[r("[-/]")," ",b,"",a," "];return function(d){return Z(P(d.toLowerCase(),c))}}(),S={icase:function(a){return a.toLowerCase()},simple:function(){const a=r("\\s+"),b=r("[^a-z0-9 ]"),c=r("[-/]"),d=r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"), | ||
e=r("[\u00e8\u00e9\u00ea\u00eb]"),g=r("[\u00ec\u00ed\u00ee\u00ef]"),f=r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),h=r("[\u00f9\u00fa\u00fb\u00fc\u0171]"),k=r("[\u00fd\u0177\u00ff]"),l=r("\u00f1"),p=r("[\u00e7c]"),n=r("\u00df"),m=r(" & "),u=[d,"a",e,"e",g,"i",f,"o",h,"u",k,"y",l,"n",p,"k",n,"s",m," and ",c," ",b,"",a," "];return function(q){q=P(q.toLowerCase(),u);return" "===q?"":q}}(),advanced:function(){const a=r("ae"),b=r("ai"),c=r("ay"),d=r("ey"),e=r("oe"),g=r("ue"),f=r("ie"),h=r("sz"),k=r("zs"), | ||
l=r("ck"),p=r("cc"),n=r("sh"),m=r("th"),u=r("dt"),q=r("ph"),A=r("pf"),z=r("ou"),y=r("uo"),t=[a,"a",b,"ei",c,"ei",d,"ei",e,"o",g,"u",f,"i",h,"s",k,"s",n,"s",l,"k",p,"k",m,"t",u,"t",q,"f",A,"f",z,"o",y,"u"];return function(v,x){if(!v)return v;v=this.simple(v);2<v.length&&(v=P(v,t));x||1<v.length&&(v=Z(v));return v}}(),extra:function(){const a=r("p"),b=r("z"),c=r("[cgq]"),d=r("n"),e=r("d"),g=r("[vw]"),f=r("[aeiouy]"),h=[a,"b",b,"s",c,"k",d,"m",e,"t",g,"f",f,""];return function(k){if(!k)return k;k=this.advanced(k, | ||
!0);if(1<k.length){k=k.split(" ");for(let l=0;l<k.length;l++){const p=k[l];1<p.length&&(k[l]=p[0]+P(p.substring(1),h))}k=k.join(" ");k=Z(k)}return k}}(),balance:pa},oa=function(){function a(b){this.clear();this.A=!0!==b&&b}a.prototype.clear=function(){this.cache=B();this.count=B();this.index=B();this.l=[]};a.prototype.set=function(b,c){if(this.A&&C(this.cache[b])){let d=this.l.length;if(d===this.A){d--;const e=this.l[d];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[b]= | ||
d;this.l[d]=b;this.count[b]=-1;this.cache[b]=c;this.get(b)}else this.cache[b]=c};a.prototype.get=function(b){const c=this.cache[b];if(this.A&&c){var d=++this.count[b];const g=this.index;let f=g[b];if(0<f){const h=this.l;for(var e=f;this.count[h[--f]]<=d&&-1!==f;);f++;if(f!==e){for(d=e;d>f;d--)e=h[d-1],h[d]=e,g[e]=d;h[f]=b;g[b]=f}}}return c};return a}();return w}(!1),this); |
/* | ||
FlexSearch v0.6.24 | ||
FlexSearch v0.6.30 | ||
Copyright 2019 Nextapps GmbH | ||
@@ -10,6 +10,6 @@ Author: Thomas Wilkerling | ||
(function(w, N, Q) { | ||
let J; | ||
(J = Q.define) && J.amd ? J([], function() { | ||
let K; | ||
(K = Q.define) && K.amd ? K([], function() { | ||
return N; | ||
}) : (J = Q.modules) ? J[w.toLowerCase()] = N : "object" === typeof exports ? module.exports = N : Q[w] = N; | ||
}) : (K = Q.modules) ? K[w.toLowerCase()] = N : "object" === typeof exports ? module.exports = N : Q[w] = N; | ||
})("FlexSearch", function() { | ||
@@ -40,5 +40,5 @@ function w(a, b) { | ||
for (let g = 0, f = 0; g < c; g++) { | ||
const k = a[g]; | ||
if (d && b(k) || !d && !b[k]) { | ||
e[f++] = k; | ||
const h = a[g]; | ||
if (d && b(h) || !d && !b[h]) { | ||
e[f++] = h; | ||
} | ||
@@ -48,6 +48,6 @@ } | ||
} | ||
function J(a, b, c, d, e, g, f, k, h, m) { | ||
c = da(c, f ? 0 : e, k, g, b, h, m); | ||
let n; | ||
k && (k = c.page, n = c.next, c = c.result); | ||
function K(a, b, c, d, e, g, f, h, k, l) { | ||
c = da(c, f ? 0 : e, h, g, b, k, l); | ||
let p; | ||
h && (h = c.page, p = c.next, c = c.result); | ||
if (f) { | ||
@@ -57,3 +57,3 @@ b = this.where(f, null, e, c); | ||
b = c; | ||
c = this.h; | ||
c = this.i; | ||
e = b.length; | ||
@@ -67,4 +67,4 @@ g = Array(e); | ||
c = b; | ||
d && (O(d) || (K = d.split(":"), 1 < K.length ? d = ka : (K = K[0], d = la)), c.sort(d)); | ||
c = R(k, n, c); | ||
d && (O(d) || (L = d.split(":"), 1 < L.length ? d = ka : (L = L[0], d = la)), c.sort(d)); | ||
c = R(h, p, c); | ||
this.cache && this.j.set(a, c); | ||
@@ -85,9 +85,9 @@ return c; | ||
} | ||
function T(a, b, c, d, e, g, f, k) { | ||
function T(a, b, c, d, e, g, f, h) { | ||
if (b[c]) { | ||
return b[c]; | ||
} | ||
e = e ? (k - (f || k / 1.5)) * g + (f || k / 1.5) * e : g; | ||
e = e ? (h - (f || h / 1.5)) * g + (f || h / 1.5) * e : g; | ||
b[c] = e; | ||
e >= f && (a = a[k - (e + 0.5 >> 0)], a = a[c] || (a[c] = []), a[a.length] = d); | ||
e >= f && (a = a[h - (e + 0.5 >> 0)], a = a[c] || (a[c] = []), a[a.length] = d); | ||
return e; | ||
@@ -101,8 +101,8 @@ } | ||
if (f) { | ||
for (let k = 0, h = f.length; k < h; k++) { | ||
if (f[k] === b) { | ||
1 === h ? delete a[g] : f.splice(k, 1); | ||
for (let h = 0, k = f.length; h < k; h++) { | ||
if (f[h] === b) { | ||
1 === k ? delete a[g] : f.splice(h, 1); | ||
break; | ||
} else { | ||
G(f[k]) && Y(f[k], b); | ||
G(f[h]) && Y(f[h], b); | ||
} | ||
@@ -138,10 +138,10 @@ } | ||
function la(a, b) { | ||
a = a[K]; | ||
b = b[K]; | ||
a = a[L]; | ||
b = b[L]; | ||
return a < b ? -1 : a > b ? 1 : 0; | ||
} | ||
function ka(a, b) { | ||
const c = K.length; | ||
const c = L.length; | ||
for (let d = 0; d < c; d++) { | ||
a = a[K[d]], b = b[K[d]]; | ||
a = a[L[d]], b = b[L[d]]; | ||
} | ||
@@ -154,41 +154,41 @@ return a < b ? -1 : a > b ? 1 : 0; | ||
function da(a, b, c, d, e, g, f) { | ||
let k, h = []; | ||
let h, k = []; | ||
if (!0 === c) { | ||
c = "0"; | ||
var m = ""; | ||
var l = ""; | ||
} else { | ||
m = c && c.split(":"); | ||
l = c && c.split(":"); | ||
} | ||
const n = a.length; | ||
if (1 < n) { | ||
const p = a.length; | ||
if (1 < p) { | ||
const y = B(), t = []; | ||
let v, x; | ||
var p = 0, l; | ||
var n = 0, m; | ||
let H; | ||
var u = !0; | ||
let D, E = 0, M, aa, U, ba; | ||
m && (2 === m.length ? (U = m, m = !1) : m = ba = parseInt(m[0], 10)); | ||
l && (2 === l.length ? (U = l, l = !1) : l = ba = parseInt(l[0], 10)); | ||
if (f) { | ||
for (v = B(); p < n; p++) { | ||
if ("not" === e[p]) { | ||
for (x = a[p], H = x.length, l = 0; l < H; l++) { | ||
v["@" + x[l]] = 1; | ||
for (v = B(); n < p; n++) { | ||
if ("not" === e[n]) { | ||
for (x = a[n], H = x.length, m = 0; m < H; m++) { | ||
v["@" + x[m]] = 1; | ||
} | ||
} else { | ||
aa = p + 1; | ||
aa = n + 1; | ||
} | ||
} | ||
if (C(aa)) { | ||
return R(c, k, h); | ||
return R(c, h, k); | ||
} | ||
p = 0; | ||
n = 0; | ||
} else { | ||
M = L(e) && e; | ||
M = I(e) && e; | ||
} | ||
let V; | ||
for (; p < n; p++) { | ||
const na = p === (aa || n) - 1; | ||
if (!M || !p) { | ||
if ((l = M || e && e[p]) && "and" !== l) { | ||
if ("or" === l) { | ||
for (; n < p; n++) { | ||
const na = n === (aa || p) - 1; | ||
if (!M || !n) { | ||
if ((m = M || e && e[n]) && "and" !== m) { | ||
if ("or" === m) { | ||
V = !1; | ||
@@ -202,3 +202,3 @@ } else { | ||
} | ||
x = a[p]; | ||
x = a[n]; | ||
if (H = x.length) { | ||
@@ -208,6 +208,6 @@ if (u) { | ||
var q = D.length; | ||
for (l = 0; l < q; l++) { | ||
u = D[l]; | ||
for (m = 0; m < q; m++) { | ||
u = D[m]; | ||
var A = "@" + u; | ||
f && v[A] || (y[A] = 1, g || (h[E++] = u)); | ||
f && v[A] || (y[A] = 1, g || (k[E++] = u)); | ||
} | ||
@@ -222,16 +222,16 @@ D = null; | ||
A = !1; | ||
for (l = 0; l < H; l++) { | ||
q = x[l]; | ||
for (m = 0; m < H; m++) { | ||
q = x[m]; | ||
var z = "@" + q; | ||
const W = g ? y[z] || 0 : p; | ||
const W = g ? y[z] || 0 : n; | ||
if (!(!W && !d || f && v[z] || !g && y[z])) { | ||
if (W === p) { | ||
if (W === n) { | ||
if (na) { | ||
if (!ba || --ba < E) { | ||
if (h[E++] = q, b && E === b) { | ||
return R(c, E + (m || 0), h); | ||
if (k[E++] = q, b && E === b) { | ||
return R(c, E + (l || 0), k); | ||
} | ||
} | ||
} else { | ||
y[z] = p + 1; | ||
y[z] = n + 1; | ||
} | ||
@@ -249,3 +249,3 @@ A = !0; | ||
if (V && !d) { | ||
return R(c, k, x); | ||
return R(c, h, x); | ||
} | ||
@@ -255,21 +255,21 @@ } | ||
if (D) { | ||
if (p = D.length, f) { | ||
for (l = m ? parseInt(m, 10) : 0; l < p; l++) { | ||
a = D[l], v["@" + a] || (h[E++] = a); | ||
if (n = D.length, f) { | ||
for (m = l ? parseInt(l, 10) : 0; m < n; m++) { | ||
a = D[m], v["@" + a] || (k[E++] = a); | ||
} | ||
} else { | ||
h = D; | ||
k = D; | ||
} | ||
} | ||
if (d) { | ||
for (E = h.length, U ? (p = parseInt(U[0], 10) + 1, l = parseInt(U[1], 10) + 1) : (p = t.length, l = 0); p--;) { | ||
if (q = t[p]) { | ||
for (H = q.length; l < H; l++) { | ||
if (d = q[l], !f || !v["@" + d]) { | ||
if (h[E++] = d, b && E === b) { | ||
return R(c, p + ":" + l, h); | ||
for (E = k.length, U ? (n = parseInt(U[0], 10) + 1, m = parseInt(U[1], 10) + 1) : (n = t.length, m = 0); n--;) { | ||
if (q = t[n]) { | ||
for (H = q.length; m < H; m++) { | ||
if (d = q[m], !f || !v["@" + d]) { | ||
if (k[E++] = d, b && E === b) { | ||
return R(c, n + ":" + m, k); | ||
} | ||
} | ||
} | ||
l = 0; | ||
m = 0; | ||
} | ||
@@ -279,8 +279,8 @@ } | ||
} else { | ||
!n || e && "not" === e[0] || (h = a[0], m && (m = parseInt(m[0], 10))); | ||
!p || e && "not" === e[0] || (k = a[0], l && (l = parseInt(l[0], 10))); | ||
} | ||
b && (f = h.length, m && m > f && (m = 0), m = m || 0, k = m + b, k < f ? h = h.slice(m, k) : (k = 0, m && (h = h.slice(m)))); | ||
return R(c, k, h); | ||
b && (f = k.length, l && l > f && (l = 0), l = l || 0, h = l + b, h < f ? k = k.slice(l, h) : (h = 0, l && (k = k.slice(l)))); | ||
return R(c, h, k); | ||
} | ||
function L(a) { | ||
function I(a) { | ||
return "string" === typeof a; | ||
@@ -310,3 +310,3 @@ } | ||
} | ||
const I = {encode:"icase", c:"forward", split:/\W+/, cache:!1, async:!1, C:!1, v:!1, a:!1, b:9, threshold:0, depth:0}, fa = {memory:{encode:"extra", c:"strict", threshold:0, b:1}, speed:{encode:"icase", c:"strict", threshold:1, b:3, depth:2}, match:{encode:"extra", c:"full", threshold:1, b:3}, score:{encode:"extra", c:"strict", threshold:1, b:9, depth:4}, balance:{encode:"balance", c:"strict", threshold:0, b:3, depth:3}, fast:{encode:"icase", c:"strict", threshold:8, b:9, depth:1}}, X = []; | ||
const J = {encode:"icase", c:"forward", split:/\W+/, cache:!1, async:!1, C:!1, v:!1, a:!1, b:9, threshold:0, depth:0}, fa = {memory:{encode:"extra", c:"strict", threshold:0, b:1}, speed:{encode:"icase", c:"strict", threshold:1, b:3, depth:2}, match:{encode:"extra", c:"full", threshold:1, b:3}, score:{encode:"extra", c:"strict", threshold:1, b:9, depth:4}, balance:{encode:"balance", c:"strict", threshold:0, b:3, depth:3}, fast:{encode:"icase", c:"strict", threshold:8, b:9, depth:1}}, X = []; | ||
let ja = 0; | ||
@@ -341,18 +341,18 @@ const ha = {}, ia = {}; | ||
} else { | ||
a || (a = I), c = a.preset; | ||
a || (a = J), c = a.preset; | ||
} | ||
b = {}; | ||
L(a) ? (b = fa[a], a = {}) : c && (b = fa[c]); | ||
this.c = a.tokenize || b.c || this.c || I.c; | ||
this.split = a.split || this.split || I.split; | ||
this.v = a.rtl || this.v || I.v; | ||
this.async = "undefined" === typeof Promise || C(c = a.async) ? this.async || I.async : c; | ||
this.threshold = C(c = a.threshold) ? b.threshold || this.threshold || I.threshold : c; | ||
this.b = C(c = a.resolution) ? c = b.b || this.b || I.b : c; | ||
I(a) ? (b = fa[a], a = {}) : c && (b = fa[c]); | ||
this.c = a.tokenize || b.c || this.c || J.c; | ||
this.split = C(c = a.split) ? this.split || J.split : I(c) ? r(c) : c; | ||
this.v = a.rtl || this.v || J.v; | ||
this.async = "undefined" === typeof Promise || C(c = a.async) ? this.async || J.async : c; | ||
this.threshold = C(c = a.threshold) ? b.threshold || this.threshold || J.threshold : c; | ||
this.b = C(c = a.resolution) ? c = b.b || this.b || J.b : c; | ||
c <= this.threshold && (this.b = this.threshold + 1); | ||
this.depth = "strict" !== this.c || C(c = a.depth) ? b.depth || this.depth || I.depth : c; | ||
this.o = (c = C(c = a.encode) ? b.encode || I.encode : c) && S[c] && S[c].bind(S) || (O(c) ? c : this.o || !1); | ||
this.depth = "strict" !== this.c || C(c = a.depth) ? b.depth || this.depth || J.depth : c; | ||
this.o = (c = C(c = a.encode) ? b.encode || J.encode : c) && S[c] && S[c].bind(S) || (O(c) ? c : this.o || !1); | ||
(c = a.matcher) && this.addMatcher(c); | ||
if (c = (b = a.lang) || a.filter) { | ||
L(c) && (c = ha[c]); | ||
I(c) && (c = ha[c]); | ||
if (F(c)) { | ||
@@ -369,23 +369,39 @@ var d = this.o, e = B(); | ||
if (c = b || a.stemmer) { | ||
var k; | ||
b = L(c) ? ia[c] : c; | ||
var h; | ||
b = I(c) ? ia[c] : c; | ||
d = this.o; | ||
e = []; | ||
for (k in b) { | ||
b.hasOwnProperty(k) && (g = d ? d(k) : k, e.push(r(g + "($|\\W)"), d ? d(b[k]) : b[k])); | ||
for (h in b) { | ||
b.hasOwnProperty(h) && (g = d ? d(h) : h, e.push(r(g + "($|\\W)"), d ? d(b[h]) : b[h])); | ||
} | ||
this.stemmer = k = e; | ||
this.stemmer = h = e; | ||
} | ||
this.a = e = (c = a.doc) ? N(c) : this.a || I.a; | ||
this.i = ea(this.b - (this.threshold || 0)); | ||
this.a = e = (c = a.doc) ? N(c) : this.a || J.a; | ||
this.h = ea(this.b - (this.threshold || 0)); | ||
this.g = B(); | ||
this.f = B(); | ||
if (e) { | ||
this.h = B(); | ||
this.i = B(); | ||
a.doc = null; | ||
k = e.index = {}; | ||
h = e.index = {}; | ||
b = e.keys = []; | ||
d = e.field; | ||
g = e.tag; | ||
f = e.store; | ||
F(e.id) || (e.id = e.id.split(":")); | ||
if (f) { | ||
var k = B(); | ||
if (I(f)) { | ||
k[f] = 1; | ||
} else { | ||
if (F(f)) { | ||
for (let l = 0; l < f.length; l++) { | ||
k[f[l]] = 1; | ||
} | ||
} else { | ||
G(f) && (k = f); | ||
} | ||
} | ||
e.store = k; | ||
} | ||
if (g) { | ||
@@ -395,8 +411,8 @@ this.w = B(); | ||
if (d) { | ||
if (L(d)) { | ||
if (I(d)) { | ||
f[d] = a; | ||
} else { | ||
if (F(d)) { | ||
for (let h = 0; h < d.length; h++) { | ||
f[d[h]] = a; | ||
for (k = 0; k < d.length; k++) { | ||
f[d[k]] = a; | ||
} | ||
@@ -416,18 +432,16 @@ } else { | ||
if (d) { | ||
let h; | ||
F(d) || (G(d) ? (h = d, e.field = d = Object.keys(d)) : e.field = d = [d]); | ||
let l; | ||
F(d) || (G(d) ? (l = d, e.field = d = Object.keys(d)) : e.field = d = [d]); | ||
for (e = 0; e < d.length; e++) { | ||
g = d[e], F(g) || (h && (a = h[g]), b[e] = g, d[e] = g.split(":")), k[g] = new w(a), k[g].h = this.h; | ||
g = d[e], F(g) || (l && (a = l[g]), b[e] = g, d[e] = g.split(":")), h[g] = new w(a); | ||
} | ||
} | ||
a.doc = c; | ||
} | ||
this.u = !0; | ||
this.j = (this.cache = c = C(c = a.cache) ? this.cache || I.cache : c) ? new oa(c) : !1; | ||
this.j = (this.cache = c = C(c = a.cache) ? this.cache || J.cache : c) ? new oa(c) : !1; | ||
return this; | ||
}; | ||
w.prototype.encode = function(a) { | ||
a && X.length && (a = P(a, X)); | ||
a && this.m.length && (a = P(a, this.m)); | ||
a && this.o && (a = this.o(a)); | ||
a && this.stemmer && (a = P(a, this.stemmer)); | ||
a && (X.length && (a = P(a, X)), this.m.length && (a = P(a, this.m)), this.o && (a = this.o(a)), this.stemmer && (a = P(a, this.stemmer))); | ||
return a; | ||
@@ -446,3 +460,3 @@ }; | ||
} | ||
if (b && L(b) && (a || 0 === a)) { | ||
if (b && I(b) && (a || 0 === a)) { | ||
var g = "@" + a; | ||
@@ -480,26 +494,26 @@ if (this.f[g] && !d) { | ||
this.filter && (e = Q(e, this.filter)); | ||
const p = B(); | ||
p._ctx = B(); | ||
const l = e.length, u = this.threshold, q = this.depth, A = this.b, z = this.i, y = this.v; | ||
for (let t = 0; t < l; t++) { | ||
const n = B(); | ||
n._ctx = B(); | ||
const m = e.length, u = this.threshold, q = this.depth, A = this.b, z = this.h, y = this.v; | ||
for (let t = 0; t < m; t++) { | ||
var f = e[t]; | ||
if (f) { | ||
var k = f.length, h = (y ? t + 1 : l - t) / l, m = ""; | ||
var h = f.length, k = (y ? t + 1 : m - t) / m, l = ""; | ||
switch(c) { | ||
case "reverse": | ||
case "both": | ||
for (var n = k; --n;) { | ||
m = f[n] + m, T(z, p, m, a, y ? 1 : (k - n) / k, h, u, A - 1); | ||
for (var p = h; --p;) { | ||
l = f[p] + l, T(z, n, l, a, y ? 1 : (h - p) / h, k, u, A - 1); | ||
} | ||
m = ""; | ||
l = ""; | ||
case "forward": | ||
for (n = 0; n < k; n++) { | ||
m += f[n], T(z, p, m, a, y ? (n + 1) / k : 1, h, u, A - 1); | ||
for (p = 0; p < h; p++) { | ||
l += f[p], T(z, n, l, a, y ? (p + 1) / h : 1, k, u, A - 1); | ||
} | ||
break; | ||
case "full": | ||
for (n = 0; n < k; n++) { | ||
const v = (y ? n + 1 : k - n) / k; | ||
for (let x = k; x > n; x--) { | ||
m = f.substring(n, x), T(z, p, m, a, v, h, u, A - 1); | ||
for (p = 0; p < h; p++) { | ||
const v = (y ? p + 1 : h - p) / h; | ||
for (let x = h; x > p; x--) { | ||
l = f.substring(p, x), T(z, n, l, a, v, k, u, A - 1); | ||
} | ||
@@ -509,5 +523,5 @@ } | ||
default: | ||
if (k = T(z, p, f, a, 1, h, u, A - 1), q && 1 < l && k >= u) { | ||
for (k = p._ctx[f] || (p._ctx[f] = B()), f = this.g[f] || (this.g[f] = ea(A - (u || 0))), h = t - q, m = t + q + 1, 0 > h && (h = 0), m > l && (m = l); h < m; h++) { | ||
h !== t && T(f, k, e[h], a, 0, A - (h < t ? t - h : h - t), u, A - 1); | ||
if (h = T(z, n, f, a, 1, k, u, A - 1), q && 1 < m && h >= u) { | ||
for (h = n._ctx[f] || (n._ctx[f] = B()), f = this.g[f] || (this.g[f] = ea(A - (u || 0))), k = t - q, l = t + q + 1, 0 > k && (k = 0), l > m && (l = m); k < l; k++) { | ||
k !== t && T(f, h, e[k], a, 0, A - (k < t ? t - k : k - t), u, A - 1); | ||
} | ||
@@ -525,50 +539,64 @@ } | ||
if (F(b)) { | ||
for (let h = 0, m = b.length; h < m; h++) { | ||
if (h === m - 1) { | ||
return this.s(a, b[h], c); | ||
var d = b.length; | ||
if (d--) { | ||
for (var e = 0; e < d; e++) { | ||
this.s(a, b[e]); | ||
} | ||
this.s(a, b[h]); | ||
return this.s(a, b[d], c); | ||
} | ||
} else { | ||
const h = this.a.index, m = this.a.keys; | ||
var d = this.a.tag, e = this.a.id; | ||
let n; | ||
let p; | ||
for (var g = 0; g < e.length; g++) { | ||
n = (n || b)[e[g]]; | ||
var g = this.a.index, f = this.a.keys, h = this.a.tag; | ||
e = this.a.store; | ||
var k; | ||
var l = this.a.id; | ||
d = b; | ||
for (var p = 0; p < l.length; p++) { | ||
d = d[l[p]]; | ||
} | ||
if (d) { | ||
for (e = 0; e < d.length; e++) { | ||
var f = d[e]; | ||
var k = f.split(":"); | ||
for (g = 0; g < k.length; g++) { | ||
p = (p || b)[k[g]]; | ||
if ("remove" === a && (delete this.i[d], l = f.length, l--)) { | ||
for (b = 0; b < l; b++) { | ||
g[f[b]].remove(d); | ||
} | ||
return g[f[l]].remove(d, c); | ||
} | ||
if (h) { | ||
for (k = 0; k < h.length; k++) { | ||
var n = h[k]; | ||
var m = b; | ||
l = n.split(":"); | ||
for (p = 0; p < l.length; p++) { | ||
m = m[l[p]]; | ||
} | ||
p = "@" + p; | ||
m = "@" + m; | ||
} | ||
k = this.w[f]; | ||
k = k[p] || (k[p] = []); | ||
k = this.w[n]; | ||
k = k[m] || (k[m] = []); | ||
} | ||
if ("remove" === a) { | ||
delete this.h[n]; | ||
for (let l = 0, u = m.length; l < u; l++) { | ||
if (l === u - 1) { | ||
return h[m[l]].remove(n, c), this; | ||
l = this.a.field; | ||
for (let u = 0, q = l.length; u < q; u++) { | ||
n = l[u]; | ||
h = b; | ||
for (m = 0; m < n.length; m++) { | ||
h = h[n[m]]; | ||
} | ||
n = g[f[u]]; | ||
m = "add" === a ? n.add : n.update; | ||
u === q - 1 ? m.call(n, d, h, c) : m.call(n, d, h); | ||
} | ||
if (e) { | ||
c = Object.keys(e); | ||
a = B(); | ||
for (g = 0; g < c.length; g++) { | ||
if (f = c[g], e[f]) { | ||
f = f.split(":"); | ||
let u, q; | ||
for (l = 0; l < f.length; l++) { | ||
h = f[l], q = (q || b)[h], u = (u || a)[h] = q; | ||
} | ||
} | ||
h[m[l]].remove(n); | ||
} | ||
b = a; | ||
} | ||
e = this.a.field; | ||
k && (k[k.length] = b); | ||
this.h[n] = b; | ||
for (let l = 0, u = e.length; l < u; l++) { | ||
d = e[l]; | ||
let q; | ||
for (f = 0; f < d.length; f++) { | ||
q = (q || b)[d[f]]; | ||
} | ||
d = h[m[l]]; | ||
f = "add" === a ? d.add : d.update; | ||
l === u - 1 ? f.call(d, n, q, c) : f.call(d, n, q); | ||
} | ||
this.i[d] = b; | ||
} | ||
@@ -581,3 +609,3 @@ return this; | ||
} | ||
this.f["@" + a] && L(b) && (this.remove(a), this.add(a, b, c, !0)); | ||
this.f["@" + a] && I(b) && (this.remove(a), this.add(a, b, c, !0)); | ||
return this; | ||
@@ -613,3 +641,3 @@ }; | ||
for (b = 0; b < this.b - (this.threshold || 0); b++) { | ||
Y(this.i[b], a); | ||
Y(this.h[b], a); | ||
} | ||
@@ -622,3 +650,3 @@ this.depth && Y(this.g, a); | ||
}; | ||
let K; | ||
let L; | ||
w.prototype.search = function(a, b, c, d) { | ||
@@ -639,38 +667,38 @@ if (G(b)) { | ||
let g = [], f = a; | ||
let k, h, m; | ||
let h, k, l; | ||
if (G(a) && !F(a)) { | ||
c || (c = a.callback) && (f.callback = null); | ||
h = a.sort; | ||
k = a.page; | ||
k = a.sort; | ||
h = a.page; | ||
b = a.limit; | ||
var n = a.threshold; | ||
m = a.suggest; | ||
var p = a.threshold; | ||
l = a.suggest; | ||
a = a.query; | ||
} | ||
if (this.a) { | ||
n = this.a.index; | ||
p = this.a.index; | ||
const y = f.where; | ||
var p = f.bool || "or", l = f.field; | ||
let t = p; | ||
var n = f.bool || "or", m = f.field; | ||
let t = n; | ||
let v, x; | ||
if (l) { | ||
F(l) || (l = [l]); | ||
if (m) { | ||
F(m) || (m = [m]); | ||
} else { | ||
if (F(f)) { | ||
var u = f; | ||
l = []; | ||
m = []; | ||
t = []; | ||
for (var q = 0; q < f.length; q++) { | ||
d = f[q], e = d.bool || p, l[q] = d.field, t[q] = e, "not" === e ? v = !0 : "and" === e && (x = !0); | ||
d = f[q], e = d.bool || n, m[q] = d.field, t[q] = e, "not" === e ? v = !0 : "and" === e && (x = !0); | ||
} | ||
} else { | ||
l = this.a.keys; | ||
m = this.a.keys; | ||
} | ||
} | ||
p = l.length; | ||
for (q = 0; q < p; q++) { | ||
u && (f = u[q]), k && !L(f) && (f.page = null, f.limit = 0), g[q] = n[l[q]].search(f, 0); | ||
n = m.length; | ||
for (q = 0; q < n; q++) { | ||
u && (f = u[q]), h && !I(f) && (f.page = null, f.limit = 0), g[q] = p[m[q]].search(f, 0); | ||
} | ||
if (c) { | ||
return c(J.call(this, a, t, g, h, b, m, y, k, x, v)); | ||
return c(K.call(this, a, t, g, k, b, l, y, h, x, v)); | ||
} | ||
@@ -681,13 +709,13 @@ if (this.async) { | ||
Promise.all(g).then(function(E) { | ||
D(J.call(H, a, t, E, h, b, m, y, k, x, v)); | ||
D(K.call(H, a, t, E, k, b, l, y, h, x, v)); | ||
}); | ||
}); | ||
} | ||
return J.call(this, a, t, g, h, b, m, y, k, x, v); | ||
return K.call(this, a, t, g, k, b, l, y, h, x, v); | ||
} | ||
n || (n = this.threshold || 0); | ||
p || (p = this.threshold || 0); | ||
if (!d) { | ||
if (this.async && "function" !== typeof importScripts) { | ||
let y = this; | ||
n = new Promise(function(t) { | ||
p = new Promise(function(t) { | ||
setTimeout(function() { | ||
@@ -699,5 +727,5 @@ t(y.search(f, b, null, !0)); | ||
if (c) { | ||
n.then(c); | ||
p.then(c); | ||
} else { | ||
return n; | ||
return p; | ||
} | ||
@@ -710,3 +738,3 @@ return this; | ||
} | ||
if (!a || !L(a)) { | ||
if (!a || !I(a)) { | ||
return g; | ||
@@ -736,4 +764,4 @@ } | ||
let z = 0; | ||
1 < u && (this.depth && "strict" === this.c ? p = !0 : c.sort(ma)); | ||
if (!p || (q = this.g)) { | ||
1 < u && (this.depth && "strict" === this.c ? n = !0 : c.sort(ma)); | ||
if (!n || (q = this.g)) { | ||
const y = this.b; | ||
@@ -743,8 +771,8 @@ for (; z < u; z++) { | ||
if (t) { | ||
if (p) { | ||
if (!l) { | ||
if (n) { | ||
if (!m) { | ||
if (q[t]) { | ||
l = t, A[t] = 1; | ||
m = t, A[t] = 1; | ||
} else { | ||
if (!m) { | ||
if (!l) { | ||
return g; | ||
@@ -754,6 +782,6 @@ } | ||
} | ||
if (m && z === u - 1 && !e.length) { | ||
p = !1, t = l || t, A[t] = 0; | ||
if (l && z === u - 1 && !e.length) { | ||
n = !1, t = m || t, A[t] = 0; | ||
} else { | ||
if (!l) { | ||
if (!m) { | ||
continue; | ||
@@ -766,6 +794,6 @@ } | ||
let x = !1, H = 0; | ||
const D = p ? q[l] : this.i; | ||
const D = n ? q[m] : this.h; | ||
if (D) { | ||
let E; | ||
for (let M = 0; M < y - n; M++) { | ||
for (let M = 0; M < y - p; M++) { | ||
if (E = D[M] && D[M][t]) { | ||
@@ -777,5 +805,5 @@ v[H++] = E, x = !0; | ||
if (x) { | ||
l = t, e[e.length] = 1 < H ? v.concat.apply([], v) : v[0]; | ||
m = t, e[e.length] = 1 < H ? v.concat.apply([], v) : v[0]; | ||
} else { | ||
if (!m) { | ||
if (!l) { | ||
d = !1; | ||
@@ -792,3 +820,3 @@ break; | ||
} | ||
d && (g = da(e, b, k, m)); | ||
d && (g = da(e, b, h, l)); | ||
this.cache && this.j.set(a, g); | ||
@@ -801,24 +829,24 @@ return g; | ||
w.prototype.where = function(a, b, c, d) { | ||
const e = this.h, g = []; | ||
const e = this.i, g = []; | ||
let f = 0; | ||
let k; | ||
var h; | ||
let m; | ||
let h; | ||
var k; | ||
let l; | ||
if (G(a)) { | ||
c || (c = b); | ||
var n = Object.keys(a); | ||
var p = n.length; | ||
k = !1; | ||
if (1 === p && "id" === n[0]) { | ||
var p = Object.keys(a); | ||
var n = p.length; | ||
h = !1; | ||
if (1 === n && "id" === p[0]) { | ||
return [e[a.id]]; | ||
} | ||
if ((h = this.B) && !d) { | ||
for (var l = 0; l < h.length; l++) { | ||
var u = h[l], q = a[u]; | ||
if ((k = this.B) && !d) { | ||
for (var m = 0; m < k.length; m++) { | ||
var u = k[m], q = a[u]; | ||
if (!C(q)) { | ||
m = this.w[u]["@" + q]; | ||
if (0 === --p) { | ||
return m; | ||
l = this.w[u]["@" + q]; | ||
if (0 === --n) { | ||
return l; | ||
} | ||
n.splice(n.indexOf(u), 1); | ||
p.splice(p.indexOf(u), 1); | ||
delete a[u]; | ||
@@ -829,5 +857,5 @@ break; | ||
} | ||
h = Array(p); | ||
for (l = 0; l < p; l++) { | ||
h[l] = n[l].split(":"); | ||
k = Array(n); | ||
for (m = 0; m < n; m++) { | ||
k[m] = p[m].split(":"); | ||
} | ||
@@ -838,4 +866,4 @@ } else { | ||
c = b.length; | ||
for (n = 0; n < c; n++) { | ||
p = e[b[n]], a(p) && (g[f++] = p); | ||
for (p = 0; p < c; p++) { | ||
n = e[b[p]], a(n) && (g[f++] = n); | ||
} | ||
@@ -850,15 +878,15 @@ return g; | ||
} | ||
n = [a]; | ||
p = 1; | ||
h = [a.split(":")]; | ||
k = !0; | ||
p = [a]; | ||
n = 1; | ||
k = [a.split(":")]; | ||
h = !0; | ||
} | ||
d = m || d || Object.keys(e); | ||
l = d.length; | ||
for (u = 0; u < l; u++) { | ||
q = m ? d[u] : e[d[u]]; | ||
d = l || d || Object.keys(e); | ||
m = d.length; | ||
for (u = 0; u < m; u++) { | ||
q = l ? d[u] : e[d[u]]; | ||
let A = !0; | ||
for (let z = 0; z < p; z++) { | ||
k || (b = a[n[z]]); | ||
const y = h[z], t = y.length; | ||
for (let z = 0; z < n; z++) { | ||
h || (b = a[p[z]]); | ||
const y = k[z], t = y.length; | ||
let v = q; | ||
@@ -891,3 +919,3 @@ if (1 < t) { | ||
this.cache && (this.j.clear(), this.j = null); | ||
this.i = this.g = this.f = null; | ||
this.h = this.g = this.f = null; | ||
if (this.a) { | ||
@@ -898,3 +926,3 @@ const a = this.a.keys; | ||
} | ||
this.a = this.h = null; | ||
this.a = this.i = null; | ||
} | ||
@@ -913,8 +941,8 @@ return this; | ||
const g = this.a.index[c[e]]; | ||
a[e] = [g.i, g.g, Object.keys(g.f)]; | ||
a[e] = [g.h, g.g, Object.keys(g.f)]; | ||
} | ||
} | ||
d && (a[e] = this.h); | ||
d && (a[e] = this.i); | ||
} else { | ||
a = [this.i, this.g, Object.keys(this.f)]; | ||
a = [this.h, this.g, Object.keys(this.f)]; | ||
} | ||
@@ -938,6 +966,8 @@ b && (a = JSON.stringify(a)); | ||
for (e = 0; e < f; e++) { | ||
g = this.a.index[b[e]], g.i = a[e][0], g.g = a[e][1], g.f = c; | ||
g = this.a.index[b[e]]; | ||
const h = a[e]; | ||
h && (g.h = h[0], g.g = h[1], g.f = c); | ||
} | ||
} | ||
d && (this.h = G(d) ? d : a[e]); | ||
d && (this.i = G(d) ? d : a[e]); | ||
} else { | ||
@@ -948,3 +978,3 @@ d = a[2]; | ||
} | ||
this.i = a[0]; | ||
this.h = a[0]; | ||
this.g = a[1]; | ||
@@ -962,3 +992,3 @@ this.f = c; | ||
}, simple:function() { | ||
const a = r("\\s+"), b = r("[^a-z0-9 ]"), c = r("[-/]"), d = r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"), e = r("[\u00e8\u00e9\u00ea\u00eb]"), g = r("[\u00ec\u00ed\u00ee\u00ef]"), f = r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"), k = r("[\u00f9\u00fa\u00fb\u00fc\u0171]"), h = r("[\u00fd\u0177\u00ff]"), m = r("\u00f1"), n = r("[\u00e7c]"), p = r("\u00df"), l = r(" & "), u = [d, "a", e, "e", g, "i", f, "o", k, "u", h, "y", m, "n", n, "k", p, "s", l, " and ", c, " ", b, "", a, " "]; | ||
const a = r("\\s+"), b = r("[^a-z0-9 ]"), c = r("[-/]"), d = r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"), e = r("[\u00e8\u00e9\u00ea\u00eb]"), g = r("[\u00ec\u00ed\u00ee\u00ef]"), f = r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"), h = r("[\u00f9\u00fa\u00fb\u00fc\u0171]"), k = r("[\u00fd\u0177\u00ff]"), l = r("\u00f1"), p = r("[\u00e7c]"), n = r("\u00df"), m = r(" & "), u = [d, "a", e, "e", g, "i", f, "o", h, "u", k, "y", l, "n", p, "k", n, "s", m, " and ", c, " ", b, "", a, " "]; | ||
return function(q) { | ||
@@ -969,3 +999,3 @@ q = P(q.toLowerCase(), u); | ||
}(), advanced:function() { | ||
const a = r("ae"), b = r("ai"), c = r("ay"), d = r("ey"), e = r("oe"), g = r("ue"), f = r("ie"), k = r("sz"), h = r("zs"), m = r("ck"), n = r("cc"), p = r("sh"), l = r("th"), u = r("dt"), q = r("ph"), A = r("pf"), z = r("ou"), y = r("uo"), t = [a, "a", b, "ei", c, "ei", d, "ei", e, "o", g, "u", f, "i", k, "s", h, "s", p, "s", m, "k", n, "k", l, "t", u, "t", q, "f", A, "f", z, "o", y, "u"]; | ||
const a = r("ae"), b = r("ai"), c = r("ay"), d = r("ey"), e = r("oe"), g = r("ue"), f = r("ie"), h = r("sz"), k = r("zs"), l = r("ck"), p = r("cc"), n = r("sh"), m = r("th"), u = r("dt"), q = r("ph"), A = r("pf"), z = r("ou"), y = r("uo"), t = [a, "a", b, "ei", c, "ei", d, "ei", e, "o", g, "u", f, "i", h, "s", k, "s", n, "s", l, "k", p, "k", m, "t", u, "t", q, "f", A, "f", z, "o", y, "u"]; | ||
return function(v, x) { | ||
@@ -981,18 +1011,18 @@ if (!v) { | ||
}(), extra:function() { | ||
const a = r("p"), b = r("z"), c = r("[cgq]"), d = r("n"), e = r("d"), g = r("[vw]"), f = r("[aeiouy]"), k = [a, "b", b, "s", c, "k", d, "m", e, "t", g, "f", f, ""]; | ||
return function(h) { | ||
if (!h) { | ||
return h; | ||
const a = r("p"), b = r("z"), c = r("[cgq]"), d = r("n"), e = r("d"), g = r("[vw]"), f = r("[aeiouy]"), h = [a, "b", b, "s", c, "k", d, "m", e, "t", g, "f", f, ""]; | ||
return function(k) { | ||
if (!k) { | ||
return k; | ||
} | ||
h = this.advanced(h, !0); | ||
if (1 < h.length) { | ||
h = h.split(" "); | ||
for (let m = 0; m < h.length; m++) { | ||
const n = h[m]; | ||
1 < n.length && (h[m] = n[0] + P(n.substring(1), k)); | ||
k = this.advanced(k, !0); | ||
if (1 < k.length) { | ||
k = k.split(" "); | ||
for (let l = 0; l < k.length; l++) { | ||
const p = k[l]; | ||
1 < p.length && (k[l] = p[0] + P(p.substring(1), h)); | ||
} | ||
h = h.join(" "); | ||
h = Z(h); | ||
k = k.join(" "); | ||
k = Z(k); | ||
} | ||
return h; | ||
return k; | ||
}; | ||
@@ -1036,4 +1066,4 @@ }(), balance:pa}, oa = function() { | ||
if (0 < f) { | ||
const k = this.l; | ||
for (var e = f; this.count[k[--f]] <= d && -1 !== f;) { | ||
const h = this.l; | ||
for (var e = f; this.count[h[--f]] <= d && -1 !== f;) { | ||
} | ||
@@ -1043,5 +1073,5 @@ f++; | ||
for (d = e; d > f; d--) { | ||
e = k[d - 1], k[d] = e, g[e] = d; | ||
e = h[d - 1], h[d] = e, g[e] = d; | ||
} | ||
k[f] = b; | ||
h[f] = b; | ||
g[b] = f; | ||
@@ -1048,0 +1078,0 @@ } |
{ | ||
"name": "flexsearch", | ||
"version": "0.6.24", | ||
"version": "0.6.30", | ||
"description": "Next-Generation full text search library with zero dependencies.", | ||
@@ -42,3 +42,3 @@ "homepage": "https://github.com/nextapps-de/flexsearch/", | ||
"test-browser": "mocha-phantomjs test/index.html", | ||
"test-coverage": "nyc --reporter=html --reporter=text mocha --timeout=3000 mocha test/test.js", | ||
"test-coverage": "nyc --reporter=html --reporter=text mocha --timeout=3000 test/test.js", | ||
"test": "npm run test-develop && npm run test-production && npm run test-light && npm run test-browser && npm run test-coverage", | ||
@@ -45,0 +45,0 @@ "coverage": "nyc report --reporter=text-lcov | coveralls", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
509666
2859
7180