1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68834,16932,t=>{"use strict";t.s(["create",()=>s,"useStore",()=>o],68834);var e=t.i(71645);let r=t=>{let e,r=new Set,n=(t,n)=>{let o="function"==typeof t?t(e):t;if(!Object.is(o,e)){let t=e;e=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},e,o),r.forEach(r=>r(e,t))}},o=()=>e,i={setState:n,getState:o,getInitialState:()=>s,subscribe:t=>(r.add(t),()=>r.delete(t))},s=e=t(n,o,i);return i},n=t=>t;function o(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,o=e.default.useSyncExternalStore(t.subscribe,e.default.useCallback(()=>r(t.getState()),[t,r]),e.default.useCallback(()=>r(t.getInitialState()),[t,r]));return e.default.useDebugValue(o),o}let i=t=>{let e=(t=>t?r(t):r)(t),n=t=>o(e,t);return Object.assign(n,e),n},s=t=>t?i(t):i;function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}t.s(["default",()=>rt],16932);var l=t.g&&t.g.Object===Object&&t.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),h=u.Symbol,f=Object.prototype,d=f.hasOwnProperty,p=f.toString,g=h?h.toStringTag:void 0,w=Object.prototype.toString,v=h?h.toStringTag:void 0;function y(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":v&&v in Object(t)?function(t){var e=d.call(t,g),r=t[g];try{t[g]=void 0;var n=!0}catch(t){}var o=p.call(t);return n&&(e?t[g]=r:delete t[g]),o}(t):w.call(t)}function _(t){return null!=t&&"object"==typeof t}function b(t){return"symbol"==typeof t||_(t)&&"[object Symbol]"==y(t)}function m(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var j=Array.isArray,S=1/0,O=h?h.prototype:void 0,x=O?O.toString:void 0;function A(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function k(t){return t}function E(t){if(!A(t))return!1;var e=y(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var z,F=u["__core-js_shared__"],P=(z=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",T=Function.prototype.toString;function M(t){if(null!=t){try{return T.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var I=/^\[object .+?Constructor\]$/,N=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function D(t,e){var r,n=null==t?void 0:t[e];return!(!A(r=n)||P&&P in r)&&(E(r)?N:I).test(M(r))?n:void 0}var $,W,C=D(u,"WeakMap"),R=Object.create,U=function(){function t(){}return function(e){if(!A(e))return{};if(R)return R(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),V=Date.now,q=function(){try{var t=D(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),B=q?function(t,e){return q(t,"toString",{configurable:!0,enumerable:!1,value:function(){return e},writable:!0})}:k,J=($=0,W=0,function(){var t=V(),e=16-(t-W);if(W=t,e>0){if(++$>=800)return arguments[0]}else $=0;return B.apply(void 0,arguments)});function L(t){return t!=t}function H(t,e){return!(null==t||!t.length)&&(e==e?function(t,e,r){for(var n=-1,o=t.length;++n<o;)if(t[n]===e)return n;return -1}(t,e):function(t,e,r,n){for(var o=t.length,i=-1;++i<o;)if(e(t[i],i,t))return i;return -1}(t,L))>-1}var G=/^(?:0|[1-9]\d*)$/;function K(t,e){var r=typeof t;return!!(e=null==e?0x1fffffffffffff:e)&&("number"==r||"symbol"!=r&&G.test(t))&&t>-1&&t%1==0&&t<e}function Z(t,e,r){"__proto__"==e&&q?q(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Y(t,e){return t===e||t!=t&&e!=e}var Q=Object.prototype.hasOwnProperty;function X(t,e,r){var n=t[e];Q.call(t,e)&&Y(n,r)&&(void 0!==r||e in t)||Z(t,e,r)}function tt(t,e,r,n){var o=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var a=e[i],l=n?n(r[a],t[a],a,r,t):void 0;void 0===l&&(l=t[a]),o?Z(r,a,l):X(r,a,l)}return r}var te=Math.max;function tr(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}function tn(t){return null!=t&&tr(t.length)&&!E(t)}var to=Object.prototype;function ti(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||to)}function ts(t){return _(t)&&"[object Arguments]"==y(t)}var ta=Object.prototype,tl=ta.hasOwnProperty,tc=ta.propertyIsEnumerable,tu=ts(function(){return arguments}())?ts:function(t){return _(t)&&tl.call(t,"callee")&&!tc.call(t,"callee")},th=void 0,tf=(th?th.isBuffer:void 0)||function(){return!1},td={};function tp(t){return function(e){return t(e)}}
1td["[object Float32Array]"]=td["[object Float64Array]"]=td["[object Int8Array]"]=td["[object Int16Array]"]=td["[object Int32Array]"]=td["[object Uint8Array]"]=td["[object Uint8ClampedArray]"]=td["[object Uint16Array]"]=td["[object Uint32Array]"]=!0,td["[object Arguments]"]=td["[object Array]"]=td["[object ArrayBuffer]"]=td["[object Boolean]"]=td["[object DataView]"]=td["[object Date]"]=td["[object Error]"]=td["[object Function]"]=td["[object Map]"]=td["[object Number]"]=td["[object Object]"]=td["[object RegExp]"]=td["[object Set]"]=td["[object String]"]=td["[object WeakMap]"]=!1;var tg=function(){try{return!1}catch(t){}}(),tw=tg&&tg.isTypedArray,tv=tw?tp(tw):function(t){return _(t)&&tr(t.length)&&!!td[y(t)]},ty=Object.prototype.hasOwnProperty;function t_(t,e){var r=j(t),n=!r&&tu(t),o=!r&&!n&&tf(t),i=!r&&!n&&!o&&tv(t),s=r||n||o||i,a=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],l=a.length;for(var c in t)!e&&!ty.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||K(c,l))||a.push(c);return a}function tb(t,e){return function(r){return t(e(r))}}var tm=tb(Object.keys,Object),tj=Object.prototype.hasOwnProperty;function tS(t){return tn(t)?t_(t):function(t){if(!ti(t))return tm(t);var e=[];for(var r in Object(t))tj.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}var tO=Object.prototype.hasOwnProperty;function tx(t){return tn(t)?t_(t,!0):function(t){if(!A(t)){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var n=ti(t),o=[];for(var i in t)("constructor"!=i||!n&&tO.call(t,i))&&o.push(i);return o}(t)}var tA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tk=/^\w*$/;function tE(t,e){if(j(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!b(t))||tk.test(t)||!tA.test(t)||null!=e&&t in Object(e)}var tz=D(Object,"create"),tF=Object.prototype.hasOwnProperty,tP=Object.prototype.hasOwnProperty;function tT(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function tM(t,e){for(var r=t.length;r--;)if(Y(t[r][0],e))return r;return -1}tT.prototype.clear=function(){this.__data__=tz?tz(null):{},this.size=0},tT.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e},tT.prototype.get=function(t){var e=this.__data__;if(tz){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return tF.call(e,t)?e[t]:void 0},tT.prototype.has=function(t){var e=this.__data__;return tz?void 0!==e[t]:tP.call(e,t)},tT.prototype.set=function(t,e){var r=this.__data__;return this.size+=+!this.has(t),r[t]=tz&&void 0===e?"__lodash_hash_undefined__":e,this};var tI=Array.prototype.splice;function tN(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}tN.prototype.clear=function(){this.__data__=[],this.size=0},tN.prototype.delete=function(t){var e=this.__data__,r=tM(e,t);return!(r<0||(r==e.length-1?e.pop():tI.call(e,r,1),--this.size,0))},tN.prototype.get=function(t){var e=this.__data__,r=tM(e,t);return r<0?void 0:e[r][1]},tN.prototype.has=function(t){return tM(this.__data__,t)>-1},tN.prototype.set=function(t,e){var r=this.__data__,n=tM(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var tD=D(u,"Map");function t$(t,e){var r,n=t.__data__;return("string"==(r=typeof e)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?n["string"==typeof e?"string":"hash"]:n.map}function tW(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function tC(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(tC.Cache||tW),r}tW.prototype.clear=function(){this.size=0,this.__data__={hash:new tT,map:new(tD||tN),string:new tT}},tW.prototype.delete=function(t){var e=t$(this,t).delete(t);return this.size-=!!e,e},tW.prototype.get=function(t){return t$(this,t).get(t)},tW.prototype.has=function(t){return t$(this,t).has(t)},tW.prototype.set=function(t,e){var r=t$(this,t),n=r.size;return r.set(t,e),this.size+=+(r.size!=n),this}
1,tC.Cache=tW;var tR,tU,tV=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tq=/\\(\\)?/g,tB=(tU=(tR=tC(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tV,function(t,r,n,o){e.push(n?o.replace(tq,"$1"):r||t)}),e},function(t){return 500===tU.size&&tU.clear(),t})).cache,tR);function tJ(t,e){return j(t)?t:tE(t,e)?[t]:tB(null==t?"":function t(e){if("string"==typeof e)return e;if(j(e))return m(e,t)+"";if(b(e))return x?x.call(e):"";var r=e+"";return"0"==r&&1/e==-S?"-0":r}(t))}var tL=1/0;function tH(t){if("string"==typeof t||b(t))return t;var e=t+"";return"0"==e&&1/t==-tL?"-0":e}function tG(t,e){for(var r=0,n=(e=tJ(e,t)).length;null!=t&&r<n;)t=t[tH(e[r++])];return r&&r==n?t:void 0}function tK(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var tZ=tb(Object.getPrototypeOf,Object);function tY(t){var e=this.__data__=new tN(t);this.size=e.size}tY.prototype.clear=function(){this.__data__=new tN,this.size=0},tY.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},tY.prototype.get=function(t){return this.__data__.get(t)},tY.prototype.has=function(t){return this.__data__.has(t)},tY.prototype.set=function(t,e){var r=this.__data__;if(r instanceof tN){var n=r.__data__;if(!tD||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new tW(n)}return r.set(t,e),this.size=r.size,this};var tQ=void 0,tX=tQ?tQ.allocUnsafe:void 0;function t0(){return[]}var t1=Object.prototype.propertyIsEnumerable,t3=Object.getOwnPropertySymbols,t5=t3?function(t){return null==t?[]:function(e,r){for(var n=-1,o=null==e?0:e.length,i=0,s=[];++n<o;){var a=e[n];t1.call(t,a)&&(s[i++]=a)}return s}(t3(t=Object(t)))}:t0,t2=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)tK(e,t5(t)),t=tZ(t);return e}:t0;function t4(t,e,r){var n=e(t);return j(t)?n:tK(n,r(t))}var t6=D(u,"DataView"),t7=D(u,"Promise"),t8=D(u,"Set"),t9="[object Map]",et="[object Promise]",ee="[object Set]",er="[object WeakMap]",en="[object DataView]",eo=M(t6),ei=M(tD),es=M(t7),ea=M(t8),el=M(C),ec=y;(t6&&ec(new t6(new ArrayBuffer(1)))!=en||tD&&ec(new tD)!=t9||t7&&ec(t7.resolve())!=et||t8&&ec(new t8)!=ee||C&&ec(new C)!=er)&&(ec=function(t){var e=y(t),r="[object Object]"==e?t.constructor:void 0,n=r?M(r):"";if(n)switch(n){case eo:return en;case ei:return t9;case es:return et;case ea:return ee;case el:return er}return e});var eu=ec,eh=Object.prototype.hasOwnProperty,ef=u.Uint8Array;function ed(t){var e=new t.constructor(t.byteLength);return new ef(e).set(new ef(t)),e}var ep=/\w*$/,eg=h?h.prototype:void 0,ew=eg?eg.valueOf:void 0,ev=tg&&tg.isMap,ey=ev?tp(ev):function(t){return _(t)&&"[object Map]"==eu(t)},e_=tg&&tg.isSet,eb=e_?tp(e_):function(t){return _(t)&&"[object Set]"==eu(t)},em="[object Arguments]",ej="[object Function]",eS="[object Object]",eO={};function ex(t){return function t(e,r,n,o,i,s){var a,l=1&r,c=2&r,u=4&r;if(n&&(a=i?n(e,o,i,s):n(e)),void 0!==a)return a;if(!A(e))return e;var h=j(e);if(h){if(f=e.length,d=new e.constructor(f),f&&"string"==typeof e[0]&&eh.call(e,"index")&&(d.index=e.index,d.input=e.input),a=d,!l){var f,d,p=a,g=-1,w=e.length;for(p||(p=Array(w));++g<w;)p[g]=e[g];return p}}else{var v,y,_,b,m,S=eu(e),O=S==ej||"[object GeneratorFunction]"==S;if(tf(e)){if(l)return e.slice();var x=e.length,k=tX?tX(x):new e.constructor(x);return e.copy(k),k}if(S==eS||S==em||O&&!i){if(a=c||O||"function"!=typeof(v=e).constructor||ti(v)?{}:U(tZ(v)),!l)return c?(_=(y=a)&&tt(e,tx(e),y),tt(e,t2(e),_)):(m=(b=a)&&tt(e,tS(e),b),tt(e,t5(e),m))}else{if(!eO[S])return i?e:{};a=function(t,e,r){var n,o,i,s=t.constructor;switch(e){case"[object ArrayBuffer]":return ed(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return n=r?ed(t.buffer):t.buffer,new t.constructor(n,t.byteOffset,t.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o=r?ed(t.buffer):t.buffer,new t.constructor(o,t.byteOffset,t.length);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return(i=new t.constructor(t.source,ep.exec(t))).lastIndex=t.lastIndex,i;case"[object Symbol]":return ew?Object(ew.call(t)):{}}}(e,S,l)}}s||(s=new tY);var E=s.get(e);if(E)return E;s.set(e,a),eb(e)?e.forEach(function(o){a.add(t(o,r,n,o,e,s))}):ey(e)&&e.forEach(function(o,i){a.set(i,t(o,r,n,i,e,s))});var z=h?void 0:(u?c?function(t){return t4(t,tx,t2)}:function(t){return t4(t,tS,t5)}:c?tx:tS)(e);return function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r););}(z||e,function(o,i){z&&(o=e[i=o]),X(a,i,t(o,r,n,i,e,s))}),a}(t,4)}function eA(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new tW;++e<r;)this.add(t[e])}function ek(t,e,r,n,o,i){var s=1&r,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var h=-1,f=!0,d=2&r?new eA:void 0;for(i.set(t,e),i.set(e,t);++h<a;){var p=t[h],g=e[h];if(n)var w=s?n(g,p,h,e,t,i):n(p,g,h,t,e,i);if(void 0!==w){if(w)continue;f=!1;break}if(d){if(!function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}
1(e,function(t,e){if(!d.has(e)&&(p===t||o(p,t,r,n,i)))return d.push(e)})){f=!1;break}}else if(p!==g&&!o(p,g,r,n,i)){f=!1;break}}return i.delete(t),i.delete(e),f}function eE(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function ez(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}eO[em]=eO["[object Array]"]=eO["[object ArrayBuffer]"]=eO["[object DataView]"]=eO["[object Boolean]"]=eO["[object Date]"]=eO["[object Float32Array]"]=eO["[object Float64Array]"]=eO["[object Int8Array]"]=eO["[object Int16Array]"]=eO["[object Int32Array]"]=eO["[object Map]"]=eO["[object Number]"]=eO[eS]=eO["[object RegExp]"]=eO["[object Set]"]=eO["[object String]"]=eO["[object Symbol]"]=eO["[object Uint8Array]"]=eO["[object Uint8ClampedArray]"]=eO["[object Uint16Array]"]=eO["[object Uint32Array]"]=!0,eO["[object Error]"]=eO[ej]=eO["[object WeakMap]"]=!1,eA.prototype.add=eA.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},eA.prototype.has=function(t){return this.__data__.has(t)};var eF=h?h.prototype:void 0,eP=eF?eF.valueOf:void 0,eT=Object.prototype.hasOwnProperty,eM="[object Arguments]",eI="[object Array]",eN="[object Object]",eD=Object.prototype.hasOwnProperty;function e$(t,e,r,n,o){return t===e||(null!=t&&null!=e&&(_(t)||_(e))?function(t,e,r,n,o,i){var s=j(t),a=j(e),l=s?eI:eu(t),c=a?eI:eu(e),u=(l=l==eM?eN:l)==eN,h=(c=c==eM?eN:c)==eN,f=l==c;if(f&&tf(t)){if(!tf(e))return!1;s=!0,u=!1}if(f&&!u)return i||(i=new tY),s||tv(t)?ek(t,e,r,n,o,i):function(t,e,r,n,o,i,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new ef(t),new ef(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Y(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=eE;case"[object Set]":if(a||(a=ez),t.size!=e.size&&!(1&n))break;var l=s.get(t);if(l)return l==e;n|=2,s.set(t,e);var c=ek(a(t),a(e),n,o,i,s);return s.delete(t),c;case"[object Symbol]":if(eP)return eP.call(t)==eP.call(e)}return!1}(t,e,l,r,n,o,i);if(!(1&r)){var d=u&&eD.call(t,"__wrapped__"),p=h&&eD.call(e,"__wrapped__");
1if(d||p){var g=d?t.value():t,w=p?e.value():e;return i||(i=new tY),o(g,w,r,n,i)}}return!!f&&(i||(i=new tY),function(t,e,r,n,o,i){var s=1&r,a=t4(t,tS,t5),l=a.length;if(l!=t4(e,tS,t5).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:eT.call(e,u)))return!1}var h=i.get(t),f=i.get(e);if(h&&f)return h==e&&f==t;var d=!0;i.set(t,e),i.set(e,t);for(var p=s;++c<l;){var g=t[u=a[c]],w=e[u];if(n)var v=s?n(w,g,u,e,t,i):n(g,w,u,t,e,i);if(!(void 0===v?g===w||o(g,w,r,n,i):v)){d=!1;break}p||(p="constructor"==u)}if(d&&!p){var y=t.constructor,_=e.constructor;y==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _||(d=!1)}return i.delete(t),i.delete(e),d}(t,e,r,n,o,i))}(t,e,r,n,e$,o):t!=t&&e!=e)}function eW(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}}function eC(t,e){return null!=t&&e in Object(t)}function eR(t){var e,r,n,o,i;return"function"==typeof t?t:null==t?k:"object"==typeof t?j(t)?(n=t[0],o=t[1],tE(n)&&(i=o)==i&&!A(i)?eW(tH(n),o):function(t){var e,r=void 0===(e=null==t?void 0:tG(t,n))?void 0:e;return void 0===r&&r===o?null!=t&&function(t,e,r){for(var n=-1,o=(e=tJ(e,t)).length,i=!1;++n<o;){var s=tH(e[n]);if(!(i=null!=t&&r(t,s)))break;t=t[s]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&tr(o)&&K(s,o)&&(j(t)||tu(t))}(t,n,eC):e$(o,r,3)}):1==(r=function(t){for(var e=tS(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,o==o&&!A(o)]}return e}(t)).length&&r[0][2]?eW(r[0][0],r[0][1]):function(e){return e===t||function(t,e,r,n){var o=r.length,i=o;if(null==t)return!i;for(t=Object(t);o--;){var s=r[o];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<i;){var a=(s=r[o])[0],l=t[a],c=s[1];if(s[2]){if(void 0===l&&!(a in t))return!1}else if(!e$(c,l,3,void 0,new tY))return!1}return!0}(e,0,r)}:tE(t)?(e=tH(t),function(t){return null==t?void 0:t[e]}):function(e){return tG(e,t)}}function eU(t,e){return t&&function(t,e,r){for(var n=-1,o=Object(t),i=r(t),s=i.length;s--;){var a=i[++n];if(!1===e(o[a],a,o))break}return t}(t,e,tS)}var eV=function(t,e){if(null==t)return t;if(!tn(t))return eU(t,e);for(var r=t.length,n=-1,o=Object(t);++n<r&&!1!==e(o[n],n,o););return t};function eq(t,e){var r=-1,n=tn(t)?Array(t.length):[];return eV(t,function(t,o,i){n[++r]=e(t,o,i)}),n}function eB(t,e){return t>e}var eJ=Math.min;function eL(t){return _(t)&&tn(t)?t:[]}var eH=function(t,e){var r;return J((r=te((r=void 0,t.length-1),0),function(){for(var e=arguments,n=-1,o=te(e.length-r,0),i=Array(o);++n<o;)i[n]=e[r+n];n=-1;for(var s=Array(r+1);++n<r;)s[n]=e[n];return s[r]=k(i),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,s)}),t+"")}(function(t){var e=m(t,eL);return e.length&&e[0]===t[0]?function(t,e,r){for(var n=t[0].length,o=t.length,i=o,s=Array(o),a=1/0,l=[];i--;){var c=t[i];a=eJ(c.length,a),s[i]=n>=120&&c.length>=120?new eA(i&&c):void 0}c=t[0];var u=-1,h=s[0];t:for(;++u<n&&l.length<a;){var f=c[u],d=f;if(f=0!==f?f:0,!(h?h.has(d):H(l,d,void 0))){for(i=o;--i;){var p=s[i];if(!(p?p.has(d):H(t[i],d,void 0)))continue t}h&&h.push(d),l.push(f)}}return l}(e):[]});function eG(t,e){return t<e}function eK(t,e,r){for(var n=-1,o=t.length;++n<o;){var i=t[n],s=e(i);if(null!=s&&(void 0===a?s==s&&!b(s):r(s,a)))var a=s,l=i}return l}function eZ(t,e){for(var r,n=-1,o=t.length;++n<o;){var i=e(t[n]);void 0!==i&&(r=void 0===r?i:r+i)}return r}function eY(t,e,r,n){var o,i,s;return null==t?[]:(j(e)||(e=null==e?[]:[e]),j(r=n?void 0:r)||(r=null==r?[]:[r]),o=e,i=r,o=o.length?m(o,function(t){return j(t)?function(e){return tG(e,1===t.length?t[0]:t)}:t}):[k],s=-1,o=m(o,tp(eR)),function(t,e){var r=t.length;for(t.sort(function(t,e){return function(t,e,r){for(var n=-1,o=t.criteria,i=e.criteria,s=o.length,a=r.length;++n<s;){var l=function(t,e){if(t!==e){var r=void 0!==t,n=null===t,o=t==t,i=b(t),s=void 0!==e,a=null===e,l=e==e,c=b(e);if(!a&&!c&&!i&&t>e||i&&s&&l&&!a&&!c||n&&s&&l||!r&&l||!o)return 1;if(!n&&!i&&!c&&t<e||c&&r&&o&&!n&&!i||a&&r&&o||!s&&o||!l)return -1}return 0}(o[n],i[n]);if(l)return n>=a?l:l*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,i)});r--;)t[r]=t[r].value;return t}(eq(t,function(t,e,r){return{criteria:m(o,function(e){return e(t)}),index:++s,value:t}})))}function eQ(t){if(this.words=[],t)if(Symbol&&Symbol.iterator&&void 0!==t[Symbol.iterator]){let e=t[Symbol.iterator](),r=e.next();for(;!r.done;)this.add(r.value),r=e.next()}else for(let e=0;e<t.length;e++)this.add(t[e])}eQ.fromWords=function(t){let e=Object.create(eQ.prototype);return e.words=t,e},eQ.prototype.add=function(t){this.resize(t),this.words[t>>>5]|=1<<t},eQ.prototype.flip=function(t){this.resize(t),this.words[t>>>5]^=1<<t},eQ.prototype.clear=function(){this.words.length=0},eQ.prototype.remove=function(t){this.resize(t),this.words[t>>>5]&=~(1<<t)},eQ.prototype.isEmpty=function(t){let e=this.words.length;for(let t=0;t<e;t++)if(0!==this.words[t])return!1;return!0},eQ.prototype.has=function(t){return 0!=(this.words[t>>>5]&1<<t)},eQ.prototype.checkedAdd=function(t){this.resize(t);let e=this.words[t>>>5],r=e|1<<t;return this.words[t>>>5]=r,(r^e)>>>t},eQ.prototype.trim=function(t){let e=this.words.length;for(;e>0&&0===this.words[e-1];)e--;this.words.length=e},eQ.prototype.resize=function(t){let e=t+32>>>5;for(let t=this.words.length;t<e;t++)this.words[t]=0},eQ.prototype.hammingWeight=function(t){return 0x1010101*((t=(0x33333333&(t-=t>>>
11&0x55555555))+(t>>>2&0x33333333))+(t>>>4)&0xf0f0f0f)>>>24},eQ.prototype.hammingWeight4=function(t,e,r,n){return 0x1010101*((t=(t=(0x33333333&(t-=t>>>1&0x55555555))+(t>>>2&0x33333333))+(t>>>4)&0xf0f0f0f)+(e=(e=(0x33333333&(e-=e>>>1&0x55555555))+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)+(r=(r=(0x33333333&(r-=r>>>1&0x55555555))+(r>>>2&0x33333333))+(r>>>4)&0xf0f0f0f)+(n=(n=(0x33333333&(n-=n>>>1&0x55555555))+(n>>>2&0x33333333))+(n>>>4)&0xf0f0f0f))>>>24},eQ.prototype.size=function(){let t=0,e=this.words.length,r=this.words;for(let n=0;n<e;n++)t+=this.hammingWeight(r[n]);return t},eQ.prototype.array=function(){let t=Array(this.size()),e=0,r=this.words.length;for(let n=0;n<r;++n){let r=this.words[n];for(;0!=r;){let o=r&-r;t[e++]=(n<<5)+this.hammingWeight(o-1|0),r^=o}}return t},eQ.prototype.forEach=function(t){let e=this.words.length;for(let r=0;r<e;++r){let e=this.words[r];for(;0!=e;){let n=e&-e;t((r<<5)+this.hammingWeight(n-1|0)),e^=n}}},eQ.prototype[Symbol.iterator]=function(){let t=this.words.length,e=0,r=this.words[e],n=this.hammingWeight,o=this.words;return{[Symbol.iterator](){return this},next(){for(;e<t;){if(0!==r){let t=r&-r,o=(e<<5)+n(t-1|0);return r^=t,{done:!1,value:o}}++e<t&&(r=o[e])}return{done:!0,value:void 0}}}},eQ.prototype.clone=function(){let t=Object.create(eQ.prototype);return t.words=this.words.slice(),t},eQ.prototype.intersects=function(t){let e=Math.min(this.words.length,t.words.length);for(let r=0;r<e;++r)if(0!=(this.words[r]&t.words[r]))return!0;return!1},eQ.prototype.intersection=function(t){let e=Math.min(this.words.length,t.words.length),r=0;for(;r+7<e;r+=8)this.words[r]&=t.words[r],this.words[r+1]&=t.words[r+1],this.words[r+2]&=t.words[r+2],this.words[r+3]&=t.words[r+3],this.words[r+4]&=t.words[r+4],this.words[r+5]&=t.words[r+5],this.words[r+6]&=t.words[r+6],this.words[r+7]&=t.words[r+7];for(;r<e;++r)this.words[r]&=t.words[r];let n=this.words.length;for(r=e;r<n;++r)this.words[r]=0;return this},eQ.prototype.intersection_size=function(t){let e=Math.min(this.words.length,t.words.length),r=0;for(let n=0;n<e;++n)r+=this.hammingWeight(this.words[n]&t.words[n]);return r},eQ.prototype.new_intersection=function(t){let e=Object.create(eQ.prototype),r=Math.min(this.words.length,t.words.length);e.words=Array(r);let n=0;for(;n+7<r;n+=8)e.words[n]=this.words[n]&t.words[n],e.words[n+1]=this.words[n+1]&t.words[n+1],e.words[n+2]=this.words[n+2]&t.words[n+2],e.words[n+3]=this.words[n+3]&t.words[n+3],e.words[n+4]=this.words[n+4]&t.words[n+4],e.words[n+5]=this.words[n+5]&t.words[n+5],e.words[n+6]=this.words[n+6]&t.words[n+6],e.words[n+7]=this.words[n+7]&t.words[n+7];for(;n<r;++n)e.words[n]=this.words[n]&t.words[n];return e},eQ.prototype.equals=function(t){let e=Math.min(this.words.length,t.words.length);for(let r=0;r<e;++r)if(this.words[r]!=t.words[r])return!1;if(this.words.length<t.words.length){let e=t.words.length;for(let r=this.words.length;r<e;++r)if(0!=t.words[r])return!1}else if(t.words.length<this.words.length){let e=this.words.length;for(let r=t.words.length;r<e;++r)if(0!=this.words[r])return!1}return!0},eQ.prototype.difference=function(t){let e=Math.min(this.words.length,t.words.length),r=0;for(;r+7<e;r+=8)this.words[r]&=~t.words[r],this.words[r+1]&=~t.words[r+1],this.words[r+2]&=~t.words[r+2],this.words[r+3]&=~t.words[r+3],this.words[r+4]&=~t.words[r+4],this.words[r+5]&=~t.words[r+5],this.words[r+6]&=~t.words[r+6],this.words[r+7]&=~t.words[r+7];for(;r<e;++r)this.words[r]&=~t.words[r];return this},eQ.prototype.new_difference=function(t){return this.clone().difference(t)},eQ.prototype.difference2=function(t){let e=Math.min(this.words.length,t.words.length),r=0;for(;r+7<e;r+=8)t.words[r]=this.words[r]&~t.words[r],t.words[r+1]=this.words[r+1]&~t.words[r+1],t.words[r+2]=this.words[r+2]&~t.words[r+2],t.words[r+3]=this.words[r+3]&~t.words[r+3],t.words[r+4]=this.words[r+4]&~t.words[r+4],t.words[r+5]=this.words[r+5]&~t.words[r+5],t.words[r+6]=this.words[r+6]&~t.words[r+6],t.words[r+7]=this.words[r+7]&~t.words[r+7];for(;r<e;++r)t.words[r]=this.words[r]&~t.words[r];for(r=this.words.length-1;r>=e;--r)t.words[r]=this.words[r];return t.words.length=this.words.length,t},eQ.prototype.difference_size=function(t){let e=Math.min(this.words.length,t.words.length),r=0,n=0;for(;n<e;++n)r+=this.hammingWeight(this.words[n]&~t.words[n]);let o=this.words.length;for(;n<o;++n)r+=this.hammingWeight(this.words[n]);return r},eQ.prototype.change=function(t){let e=Math.min(this.words.length,t.words.length),r=0;for(;r+7<e;r+=8)this.words[r]^=t.words[r],this.words[r+1]^=t.words[r+1],this.words[r+2]^=t.words[r+2],this.words[r+3]^=t.words[r+3],this.words[r+4]^=t.words[r+4],this.words[r+5]^=t.words[r+5],this.words[r+6]^=t.words[r+6],this.words[r+7]^=t.words[r+7];for(;r<e;++r)this.words[r]^=t.words[r];for(r=t.words.length-1;r>=e;--r)this.words[r]=t.words[r];return this},eQ.prototype.new_change=function(t){let e=Object.create(eQ.prototype);e.words=Array(Math.max(this.words.length,t.words.length));let r=Math.min(this.words.length,t.words.length),n=0;for(;n+7<r;n+=8)e.words[n]=this.words[n]^t.words[n],e.words[n+1]=this.words[n+1]^t.words[n+1],e.words[n+2]=this.words[n+2]^t.words[n+2],e.words[n+3]=this.words[n+3]^t.words[n+3],e.words[n+4]=this.words[n+4]^t.words[n+4],e.words[n+5]=this.words[n+5]^t.words[n+5],e.words[n+6]=this.words[n+6]^t.words[n+6],e.words[n+7]=this.words[n+7]^t.words[n+7];for(;n<r;++n)e.words[n]=this.words[n]^t.words[n];let o=this.words.length;for(n=r;n<o;++n)e.words[n]=this.words[n];let i=t.words.length;for(n=r;n<i;
1++n)e.words[n]=t.words[n];return e},eQ.prototype.change_size=function(t){let e=Math.min(this.words.length,t.words.length),r=0,n=0;for(;n<e;++n)r+=this.hammingWeight(this.words[n]^t.words[n]);let o=this.words.length>t.words.length?this:t,i=o.words.length;for(;n<i;++n)r+=this.hammingWeight(o.words[n]);return r},eQ.prototype.toString=function(){return"{"+this.array().join(",")+"}"},eQ.prototype.union=function(t){let e=Math.min(this.words.length,t.words.length),r=0;for(;r+7<e;r+=8)this.words[r]|=t.words[r],this.words[r+1]|=t.words[r+1],this.words[r+2]|=t.words[r+2],this.words[r+3]|=t.words[r+3],this.words[r+4]|=t.words[r+4],this.words[r+5]|=t.words[r+5],this.words[r+6]|=t.words[r+6],this.words[r+7]|=t.words[r+7];for(;r<e;++r)this.words[r]|=t.words[r];if(this.words.length<t.words.length){this.resize((t.words.length<<5)-1);let r=t.words.length;for(let n=e;n<r;++n)this.words[n]=t.words[n]}return this},eQ.prototype.new_union=function(t){let e=Object.create(eQ.prototype);e.words=Array(Math.max(this.words.length,t.words.length));let r=Math.min(this.words.length,t.words.length),n=0;for(;n+7<r;n+=8)e.words[n]=this.words[n]|t.words[n],e.words[n+1]=this.words[n+1]|t.words[n+1],e.words[n+2]=this.words[n+2]|t.words[n+2],e.words[n+3]=this.words[n+3]|t.words[n+3],e.words[n+4]=this.words[n+4]|t.words[n+4],e.words[n+5]=this.words[n+5]|t.words[n+5],e.words[n+6]=this.words[n+6]|t.words[n+6],e.words[n+7]=this.words[n+7]|t.words[n+7];for(;n<r;++n)e.words[n]=this.words[n]|t.words[n];let o=this.words.length;for(n=r;n<o;++n)e.words[n]=this.words[n];let i=t.words.length;for(n=r;n<i;++n)e.words[n]=t.words[n];return e},eQ.prototype.union_size=function(t){let e=Math.min(this.words.length,t.words.length),r=0;for(let n=0;n<e;++n)r+=this.hammingWeight(this.words[n]|t.words[n]);if(this.words.length<t.words.length){let e=t.words.length;for(let n=this.words.length;n<e;++n)r+=this.hammingWeight(0|t.words[n])}else{let e=this.words.length;for(let n=t.words.length;n<e;++n)r+=this.hammingWeight(0|this.words[n])}return r};let eX=function(t,e){if(!t||"object"!=typeof t)throw Error("Invalid facets_data provided.");if(!e||"object"!=typeof e)return null;let r=Object.entries(e).flatMap(t=>{let[e,r]=t;return Array.isArray(r)?r.map(t=>({field:e,filter:t})):[]});return 0===r.length?null:r.reduce((e,r)=>{var n;let{field:o,filter:i}=r,s=(null==(n=t[o])?void 0:n[i])||new eQ([]);return e.new_union(s)},new eQ([]))},e0=function(t,e,r){var n,o,i;let s=1;return n=t.bits_data_temp,o=(t,n)=>{let o,i,l,c,u,h,f;r[n]&&(o=r[n].order,i=r[n].sort,l=r[n].size,c=r[n].title,u=r[n].show_facet_stats||!1,h=!1!==r[n].chosen_filters_on_top,f=r[n].hide_zero_doc_count||!1);let d,p,g,w=Object.entries(t).map(t=>{let r=[];e&&e.filters&&e.filters[n]&&(r=e.filters[n]);let o=t[1].array().length,i=r.some(e=>String(e)===String(t[0]));if(!f||0!==o||i)return{key:t[0],doc_count:o,selected:i}}).filter(Boolean);if(j(i)?(d=i||["key"],p=o||["asc"]):("term"===i||"key"===i?(d=["key"],p=[o||"asc"]):(d=["doc_count","key"],p=[o||"desc","asc"]),h&&(d.unshift("selected"),p.unshift("desc"))),w=(w=eY(w,d,p)).slice(0,l||10),u){var v,y;let e=[];Object.entries(t).forEach(t=>{if(isNaN(t[0]))throw Error("You cant use chars to calculate the facet_stats.");t[1].array().length>0&&t[1].forEach(()=>{e.push(parseInt(t[0]))})}),g={min:e&&e.length?eK(e,eR(void 0),eG):void 0,max:e&&e.length?eK(e,eR(void 0),eB):void 0,avg:(v=eR(void 0),(y=null==e?0:e.length)?eZ(e,v)/y:NaN),sum:e&&e.length?eZ(e,eR(void 0)):0}}return a({name:n,title:c||n.replace(/^[\s_]+|[\s_]+$/g,"").replace(/[_\s]+/g," ").replace(/^[a-z]/,function(t){return t.toUpperCase()}),position:s++,buckets:w},u&&{facet_stats:g})},i={},o=eR(o),eU(n,function(t,e,r){Z(i,e,o(t,e,r))}),i};function e1(t){return!!~t.search(/\(|\)/)}function e3(t,e){for(var r=e.split(" "+t+" "),n=[],o=[],i=0;i<r.length;i++)if(e1(r[i])||o.length>0){o.push(r[i]);var s=""+o;(s.match(/\(/g)||[]).length===(s.match(/\)/g)||[]).length&&(n.push(o.join(" "+t+" ")),o=[])}else n.push(r[i]);return n}var e5=function t(e){for(var r=e3("OR",e=(e=function(t){if("("===t.charAt(0)){for(var e=0,r=0;r<t.length;r++)if("("===t.charAt(r)?e++:")"===t.charAt(r)&&e--,0===e)return r!==t.length-1?t:t.substring(1,t.length-1)}return t}(e)).replace(/[\s]+/g," ")).map(function(e){for(var r=e3("AND",e),n=[],o=[],i=0;i<r.length;i++)e1(r[i])?n.push(t(r[i])):o.push(r[i]);return n.push([o]),function(t){for(var e=[[]],r=0;r<t.length;r++)e=function(t,e){var r=[];return t.forEach(function(t){e.forEach(function(e){r.push(t.concat(e))})}),r}(e,t[r]);return e}(n)}),n=r[0],o=1;o<r.length;o++)n=n.concat(r[o]);return n};let e2=t=>"boolean"==typeof t?t?"AND":"OR":"string"==typeof t&&"OR"===t.toUpperCase()?"OR":"AND",e4=function(t,e){let r=e&&e.aggregations||{},n=Object.create(null),o=!1,i=a({},r);return Object.keys(t||{}
1).forEach(e=>{var s,l;let c=r[e];if(!c)return;let u=null==(s=t[e])?void 0:s.selected;Array.isArray(u)&&u.length&&(n[e]=u,o=!0);let h=null==(l=t[e])?void 0:l.options;if(h){let t={};void 0!==h.conjunction&&(t.conjunction="AND"===e2(h.conjunction)),"number"==typeof h.size&&(t.size=h.size),"key"===h.sortBy?(t.sort="key",t.order=h.sortDir||c.order):"count"===h.sortBy?(t.sort=void 0,t.order=h.sortDir||c.order):h.sortDir&&(t.order=h.sortDir),"boolean"==typeof h.hideZero&&(t.hide_zero_doc_count=h.hideZero),"boolean"==typeof h.chosenOnTop&&(t.chosen_filters_on_top=h.chosenOnTop),"boolean"==typeof h.showStats&&(t.show_facet_stats=h.showStats),Object.keys(t).length&&(i[e]=a({},r[e],t))}}),{hasFilters:o,filters:o?n:void 0,aggregations:i}};function e6(t,e,r,n,o){let i=t=>"number"==typeof t?t:parseInt(t,10),s=i((e=e||Object.create(null)).per_page);(!Number.isFinite(s)||s<0)&&(s=12);let a=i(e.page);(!Number.isFinite(a)||a<1)&&(a=1),0===s&&(a=1);let l=e.is_all_filtered_items||!1;if(!1===r.native_search_enabled&&e.query)throw Error('The "query" option is not working once native search is disabled');let c=0,u=(new Date).getTime(),h,f,d,p=o.bits_ids();if(e._ids)h=new eQ(e._ids),f=e._ids;else if(e.ids)f=o.internal_ids_from_ids_map(e.ids),e.filter&&(f=t.filter(t=>f.includes(t._id)).filter(e.filter).map(t=>t._id)),h=new eQ(f);else if(n&&(e.query||e.filter)){let t=(new Date).getTime();f=n.search(e.query,e.filter),c=(new Date).getTime()-t,h=new eQ(f)}let g=(new Date).getTime(),w=o.search(e,{query_ids:h});if(g=(new Date).getTime()-g,h&&(p=h),w.ids&&(p=p.new_intersection(w.ids)),w.not_ids&&(p=p.new_difference(w.not_ids)),0===s&&!l&&!e.sort&&!f){let t=p.array(),n=(new Date).getTime()-u;return{pagination:{per_page:s,page:a,total:t.length},timings:{total:n,facets:g,search:c,sorting:0},data:{items:[],allFilteredItems:null,aggregations:e0(w,e,r.aggregations)}}}let v=!1,y=(new Date).getTime(),_,b=0,m=p.array();e.sort?_=function(t,e,r){if(r&&r[e]&&(e=r[e]),e.field){let r=Array.isArray(e.field)?e.field:[e.field],n=Array.isArray(e.order)?e.order:[e.order||"asc"],o=[],i=[];return r.forEach((t,e)=>{o.push(e=>+(null==e[t])),i.push("asc"),o.push(t),i.push(n[e]||"asc")}),eY(t,o,i)}return t}(_=m.map(t=>o.get_item(t)),e.sort,r.sortings):f?(_=(m=f.filter(t=>p.has(t))).slice((a-1)*s,a*s).map(t=>o.get_item(t)),v=!0):_=m.map(t=>o.get_item(t)),v||(d=l?_:null,_=_.slice((a-1)*s,a*s)),b=(new Date).getTime()-y;let j=(new Date).getTime()-u;return{pagination:{per_page:s,page:a,total:m.length},timings:{total:j,facets:g,search:c,sorting:b},data:{items:_,allFilteredItems:d,aggregations:e0(w,e,r.aggregations)}}}var e7=function(t){var e={exports:{}};return!function(){var t,r,n,o,i,s,a,l,c,u,h,f,d,p,g,w,v,y,_,b,m,j,S,O,x,A,k,E,z=function(t){var e=new z.Index;return e.pipeline.add(z.trimmer,z.stopWordFilter,z.stemmer),t&&t.call(e,e),e};z.version="1.0.0",z.utils={},z.utils.warn=(t=this,function(e){t.console&&console.warn&&console.warn(e)}),z.utils.asString=function(t){return null==t?"":t.toString()},z.EventEmitter=function(){this.events={}},z.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();if("function"!=typeof e)throw TypeError("last argument must be a function");t.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},z.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var r=this.events[t].indexOf(e);this.events[t].splice(r,1),this.events[t].length||delete this.events[t]}},z.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},z.EventEmitter.prototype.hasHandler=function(t){return t in this.events},z.tokenizer=function(t){return arguments.length&&null!=t&&null!=t?Array.isArray(t)?t.map(function(t){return z.utils.asString(t).toLowerCase()}):t.toString().trim().toLowerCase().split(z.tokenizer.separator):[]},z.tokenizer.separator=/[\s\-]+/,z.tokenizer.load=function(t){var e=this.registeredFunctions[t];if(!e)throw Error("Cannot load un-registered function: "+t);return e},z.tokenizer.label="default",z.tokenizer.registeredFunctions={default:z.tokenizer},z.tokenizer.registerFunction=function(t,e){e in this.registeredFunctions&&z.utils.warn("Overwriting existing tokenizer: "+e),t.label=e,this.registeredFunctions[e]=t},z.Pipeline=function(){this._stack=[]},z.Pipeline.registeredFunctions={},z.Pipeline.registerFunction=function(t,e){e in this.registeredFunctions&&z.utils.warn("Overwriting existing registered function: "+e),t.label=e,z.Pipeline.registeredFunctions[t.label]=t},z.Pipeline.warnIfFunctionNotRegistered=function(t){t.label&&t.label in this.registeredFunctions||z.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},z.Pipeline.load=function(t){var e=new z.Pipeline;return t.forEach(function(t){var r=z.Pipeline.registeredFunctions[t];if(!r)throw Error("Cannot load un-registered function: "+t);e.add(r)}),e},z.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEac
vendor: 4,256 bytes, line 1
1h(function(t){z.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},z.Pipeline.prototype.after=function(t,e){z.Pipeline.warnIfFunctionNotRegistered(e);var r=this._stack.indexOf(t);if(-1==r)throw Error("Cannot find existingFn");this._stack.splice(r+=1,0,e)},z.Pipeline.prototype.before=function(t,e){z.Pipeline.warnIfFunctionNotRegistered(e);var r=this._stack.indexOf(t);if(-1==r)throw Error("Cannot find existingFn");this._stack.splice(r,0,e)},z.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},z.Pipeline.prototype.run=function(t){for(var e=[],r=t.length,n=this._stack.length,o=0;o<r;o++){for(var i=t[o],s=0;s<n&&void 0!==(i=this._stack[s](i,o,t))&&""!==i;s++);void 0!==i&&""!==i&&e.push(i)}return e},z.Pipeline.prototype.reset=function(){this._stack=[]},z.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return z.Pipeline.warnIfFunctionNotRegistered(t),t.label})},z.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},z.Vector.Node=function(t,e,r){this.idx=t,this.val=e,this.next=r},z.Vector.prototype.insert=function(t,e){this._magnitude=void 0;var r=this.list;if(!r||t<r.idx)return this.list=new z.Vector.Node(t,e,r),this.length++;for(var n=r,o=r.next;null!=o&&!(t<o.idx);)n=o,o=o.next;return n.next=new z.Vector.Node(t,e,o),this.length++},z.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t,e=this.list,r=0;e;)r+=(t=e.val)*t,e=e.next;return this._magnitude=Math.sqrt(r)},z.Vector.prototype.dot=function(t){for(var e=this.list,r=t.list,n=0;e&&r;)e.idx<r.idx?e=e.next:(e.idx>r.idx||(n+=e.val*r.val,e=e.next),r=r.next);return n},z.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},z.SortedSet=function(){this.length=0,this.elements=[]},z.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},z.SortedSet.prototype.add=function(){var t,e;for(t=0;t<arguments.length;t++)~this.indexOf(e=arguments[t])||this.elements.splice(this.locationFor(e),0,e);this.length=this.elements.length},z.SortedSet.prototype.toArray=function(){return this.elements.slice()},z.SortedSet.prototype.map=function(t,e){return this.elements.map(t,e)},z.SortedSet.prototype.forEach=function(t,e){return this.elements.forEach(t,e)},z.SortedSet.prototype.indexOf=function(t){for(var e=0,r=this.elements.length,n=r-e,o=e+Math.floor(n/2),i=this.elements[o];n>1;){if(i===t)return o;i<t&&(e=o),i>t&&(r=o),n=r-e,o=e+Math.floor(n/2),i=this.elements[o]}return i===t?o:-1},z.SortedSet.prototype.locationFor=function(t){for(var e=0,r=this.elements.length,n=r-e,o=e+Math.floor(n/2),i=this.elements[o];n>1;)i<t&&(e=o),i>t&&(r=o),n=r-e,o=e+Math.floor(n/2),i=this.elements[o];return i>t?o:i<t?o+1:void 0},z.SortedSet.prototype.intersect=function(t){for(var e=new z.SortedSet,r=0,n=0,o=this.length,i=t.length,s=this.elements,a=t.elements;!(r>o-1||n>i-1);)s[r]!==a[n]?s[r]<a[n]?r++:s[r]>a[n]&&n++:(e.add(s[r]),r++,n++);return e},z.SortedSet.prototype.clone=function(){var t=new z.SortedSet;return t.elements=this.toArray(),t.length=t.elements.length,t},z.SortedSet.prototype.union=function(t){var e,r,n;this.length>=t.length?(e=this,r=t):(e=t,r=this),n=e.clone();for(var o=0,i=r.toArray();o<i.length;o++)n.add(i[o]);return n},z.SortedSet.prototype.toJSON=function(){return this.toArray()},z.Index=function(){this._fields=[],this._ref="id",this.pipeline=new z.Pipeline,this.documentStore=new z.Store,this.tokenStore=new z.TokenStore,this.corpusTokens=new z.SortedSet,this.eventEmitter=new z.EventEmitter,this.tokenizerFn=z.tokenizer,this._idfCache={},this.on("add","remove","update",(function(){this._idfCache={}}).bind(this))},z.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},z.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},z.Index.load=function(t){t.version!==z.version&&z.utils.warn("version mismatch: current "+z.version+" importing "+t.version);var e=new this;return e._fields=t.fields,e._ref=t.ref,e.tokenizer(z.tokenizer.load(t.tokenizer)),e.documentStore=z.Store.load(t.documentStore),e.tokenStore=z.TokenStore.load(t.tokenStore),e.corpusTokens=z.S
vendor: 8,732 bytes, line 1
1ortedSet.load(t.corpusTokens),e.pipeline=z.Pipeline.load(t.pipeline),e},z.Index.prototype.field=function(t,e){return this._fields.push({name:t,boost:(e=e||{}).boost||1}),this},z.Index.prototype.ref=function(t){return this._ref=t,this},z.Index.prototype.tokenizer=function(t){return t.label&&t.label in z.tokenizer.registeredFunctions||z.utils.warn("Function is not a registered tokenizer. This may cause problems when serialising the index"),this.tokenizerFn=t,this},z.Index.prototype.add=function(t,e){var r={},n=new z.SortedSet,o=t[this._ref];e=void 0===e||e,this._fields.forEach(function(e){var o=this.pipeline.run(this.tokenizerFn(t[e.name]));r[e.name]=o;for(var i=0;i<o.length;i++){var s=o[i];n.add(s),this.corpusTokens.add(s)}},this),this.documentStore.set(o,n);for(var i=0;i<n.length;i++){for(var s=n.elements[i],a=0,l=0;l<this._fields.length;l++){var c=this._fields[l],u=r[c.name],h=u.length;if(h){for(var f=0,d=0;d<h;d++)u[d]===s&&f++;a+=f/h*c.boost}}this.tokenStore.add(s,{ref:o,tf:a})}e&&this.eventEmitter.emit("add",t,this)},z.Index.prototype.remove=function(t,e){var r=t[this._ref];if(e=void 0===e||e,this.documentStore.has(r)){var n=this.documentStore.get(r);this.documentStore.remove(r),n.forEach(function(t){this.tokenStore.remove(t,r)},this),e&&this.eventEmitter.emit("remove",t,this)}},z.Index.prototype.update=function(t,e){e=void 0===e||e,this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},z.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var r=this.tokenStore.count(t),n=1;return r>0&&(n=1+Math.log(this.documentStore.length/r)),this._idfCache[e]=n},z.Index.prototype.search=function(t){var e=this.pipeline.run(this.tokenizerFn(t)),r=new z.Vector,n=[],o=this._fields.reduce(function(t,e){return t+e.boost},0);return e.some(function(t){return this.tokenStore.has(t)},this)?(e.forEach(function(t,e,i){var s=1/i.length*this._fields.length*o,a=this,l=this.tokenStore.expand(t).reduce(function(e,n){var o=a.corpusTokens.indexOf(n),i=a.idf(n),l=1,c=new z.SortedSet;n!==t&&(l=1/Math.log(Math.max(3,n.length-t.length))),o>-1&&r.insert(o,s*i*l);for(var u=a.tokenStore.get(n),h=Object.keys(u),f=h.length,d=0;d<f;d++)c.add(u[h[d]].ref);return e.union(c)},new z.SortedSet);n.push(l)},this),n.reduce(function(t,e){return t.intersect(e)}).map(function(t){return{ref:t,score:r.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})):[]},z.Index.prototype.documentVector=function(t){for(var e=this.documentStore.get(t),r=e.length,n=new z.Vector,o=0;o<r;o++){var i=e.elements[o],s=this.tokenStore.get(i)[t].tf,a=this.idf(i);n.insert(this.corpusTokens.indexOf(i),s*a)}return n},z.Index.prototype.toJSON=function(){return{version:z.version,fields:this._fields,ref:this._ref,tokenizer:this.tokenizerFn.label,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},z.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},z.Store=function(){this.store={},this.length=0},z.Store.load=function(t){var e=new this;return e.length=t.length,e.store=Object.keys(t.store).reduce(function(e,r){return e[r]=z.SortedSet.load(t.store[r]),e},{}),e},z.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},z.Store.prototype.get=function(t){return this.store[t]},z.Store.prototype.has=function(t){return t in this.store},z.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},z.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},r={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},a="^("+(i="[^aeiou][^aeiouy]*")+")?"+(s=(o="[aeiouy]")+"[aeiou]*")+i+"("+s+")?$",l="^("+i+")?"+s+i+s+i,c=RegExp("^("+i+")?"+s+i),u=new RegExp(l),h=new RegExp(a),f=RegExp("^("+i+")?"+o),d=/^(.+?)(ss|i)es$/,p=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,w=/^(.+?)(ed|ing)$/,v=/.$/,y=/(at|bl|iz)$/,_=RegExp("([^aeiouylsz])\\1$"),b=RegExp("^"+i+o+"[^aeiouwxy]$"),m=/^(.+?[^aeiou])y$/,j=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,S=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,O=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,x=/^(.+?)(s|t)(ion)$/,A=/^(.+?)e$/,k=/ll$/,E=RegExp("^"+i+o+"[^aeiouwxy]$"),z.stemmer=function(t){var e,o,i,s,a,l;if(t.length<3)return t;if("y"==(i=t.substr(0,1))&&(t=i.toUpperCase()+t.substr(1)),a=p,(s=d).test(t)?t=t.replace(s,"$1$2"):a.test(t)&&(t=t.replace(a,"$1$2")),a=w,(s=g).test(t)){var z=s.exec(t);(s=c).test(z[1])&&(t=t.replace(s=v,""))}else a.test(t)&&(z=a.exec(t),(a=f).test(e=z[1])&&(l=_,(a=y).test(t=e)?t+="e":l.test(t)?t=t.replace(s=v,""):b.test(t)&&(t+="e")));return(s=m).test(t)&&(t=(e=(z=s.exec(t))[1])+"i"),(s=j).test(t)&&(o=(z=s.exec(t))[2],(s=c).test(e=z[1])&&(t=e+r[o])),(s=S).test(t)&&(o=(z=s.exec(t))[2],(s=c).test(e=z[1])&&(t=e+n[o])),a=x,(s=O).test(t)?(z=s.exec(t),(s=u).test(e=z[1])&&(t=e)):a.test(t)&&(z=a.exec(t),(a=u).test(e=z[1]+z[2])&&(t=e)),(s=A).test(t)&&(z=s.exec(t),a=h,l=E,((s=u).test(e=z[1])||a.test(e)&&!l.test(e))&&(t=e)),a=u,(s=k).test(t)&&a.test(t)&&(t=t.replace(s=v,"")),"y"==i&&(t=i.toLowerCase()+t.substr(1)),t},z.Pipeline.registerFunction(z.stemmer,"stemmer"),z.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){if(t&&e[t]!==t)return t}},z.stopWordFilter=z.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),z.Pipeline.registerFunction(z.stopWordFilter,"stopWordFilter"),z.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},z.Pipeline.registerFunction(z.trimmer,"trimmer"),z.TokenStore=function(){this.root={docs:{}},this.length=0},z.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},z.TokenStore.prototype.add=function(t,e,r){r=r||this.root;var n=t.charAt(0),o=t.slice(1);return n in r||(r[n]={docs:{}}),0===o.length?(r[n].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,r[n])},z.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,r=0;r<t.length;r++){if(!e[t.charAt(r)])return!1;e=e[t.charAt(r)]}return!0},z.TokenStore.prototype.getNode=function(t){if(!t)return{};for(var e=this.root,r=0;r<t.length;r++){if(!e[t.charAt(r)])return{};e=e[t.charAt(r)]}return e},z.TokenStore.prototype.get=function(t,e){return this.getNode(t,e).docs||{}},z.TokenStore.prototype.count=function(t,e){return Object.keys(this.get(t,e)).length},z.TokenStore.prototype.remove=function(t,e){if(t){for(var r=this.root,n=0;n<t.length;n++){if(!(t.charAt(n)in r))return;r=r[t.charAt(n)]}delete r.docs[e]}},z.TokenStore.prototype.expand=function(t,e){var r=this.getNode(t);return e=e||[],Object.keys(r.docs||{}).length&&e.push(t),Object.keys(r).forEach(function(r){"docs"!==r&&e.concat(this.expand(t+r,e))},this),e},z.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},e.exports=z}(),e.exports}();class e8{serialize(){return{index:JSON.parse(JSON.stringify(this.idx)),store:[...this.store.entries()]}}search_full(t,e){return this.search(t,e).map(t=>this.store.get(t))}search(t,e){return e instanceof Function?(t?this.idx.search(t).map(t=>this.store.get(t.ref)):[...this.store.values()]).filter(e).map(t=>t._id):t?this.idx.search(t).map(t=>t.ref):[...this.store.keys()]}constructor(t,e){if(this.store=new Map,null!=e&&e.fulltextSnapshot){let t=JSON.parse(JSON.stringify(e.fulltextSnapshot.index));return this.idx=e7.Index.load(t),void(this.store=new Map(e.fulltextSnapshot.store))}this.idx=e7(function(){this.field("name",{boost:10}
1),((null==e?void 0:e.searchableFields)||[]).forEach(t=>this.field(t)),this.ref("_id"),null!=e&&e.isExactSearch&&(this.pipeline.remove(e7.stemmer),this.pipeline.remove(e7.stopWordFilter)),null!=e&&e.removeStopWordFilter&&this.pipeline.remove(e7.stopWordFilter)});let r=1;(t||[]).map(t=>{null==t._id&&(t._id=r),++r,this.idx.add(t),this.store.set(t._id,t)})}}class e9{items(){return this._items}bits_ids(t){return t?new eQ(t):this._bits_ids}internal_ids_from_ids_map(t){return t.map(t=>this.ids_map[t])}index(){return this.facets}serialize(){var t;let e=Object.create(null);if(null!=(t=this.facets)&&t.bits_data)for(let t in this.facets.bits_data)for(let r in e[t]=Object.create(null),this.facets.bits_data[t])e[t][r]=this.facets.bits_data[t][r].array();return{bitsData:e,ids:this._ids,idsMap:this.ids_map}}get_item(t){return this._items_map[t]}search(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config,n={};n.not_ids=eX(this.facets.bits_data,t.not_filters);let o=function(t,e){let r=[];for(let o in t.filters){var n;let i=t.filters[o];if(i&&i.length)if(!1!==(null==(n=e[o])?void 0:n.conjunction))i.forEach(t=>{r.push([o,t])});else{let t=i.map(t=>[o,t]);r.push(t)}}for(let e in t.not_filters){let n=t.not_filters[e];n&&n.length&&n.forEach(t=>{r.push([e,"-",t])})}return r}(t,r),i=function(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=ex(t);for(let t in n.bits_data_temp={},n.bits_data)for(let e in n.bits_data_temp[t]={},n.bits_data[t])n.bits_data_temp[t][e]=n.bits_data[t][e];n.is_temp_copied=!0;let o=function(t,e){let r={};return e.forEach(e=>{if(Array.isArray(e[0])){let n=new eQ,o=new Set;e.forEach(e=>{var r;let[i,s]=e;o.add(i);let a=(null==(r=t.bits_data[i])?void 0:r[s])||new eQ;n=n.new_union(a)}),o.forEach(t=>{r[t]=n})}}),r}(t,r);if(r.forEach(t=>{if(!Array.isArray(t[0])){var r;let[o,i]=t,s=null==(r=n.bits_data_temp[o])?void 0:r[i];e=e&&s?s.new_intersection(e):e&&!s?new eQ([]):s}}),e)for(let t in n.bits_data_temp)for(let r in n.bits_data_temp[t])n.bits_data_temp[t][r]=n.bits_data_temp[t][r].new_intersection(e);for(let t in r.forEach(t=>{if(3===t.length&&"-"===t[1]){var e,r;let[o,,i]=t,s=(null==(e=n.bits_data_temp[o])||null==(r=e[i])?void 0:r.clone())||new eQ;for(let t in n.bits_data_temp)for(let e in n.bits_data_temp[t])n.bits_data_temp[t][e]=n.bits_data_temp[t][e].new_difference(s)}}),n.bits_data_temp)for(let e in n.bits_data_temp[t])for(let r in o)r!==t&&(n.bits_data_temp[t][e]=n.bits_data_temp[t][e].new_intersection(o[r]));return n}(this.facets,o);t.filters_query&&(i=function(t,e){let r=ex(t);if(r.bits_data_temp||(r.bits_data_temp={}),!r.is_temp_copied)for(let t in r.bits_data)for(let e in r.bits_data_temp[t]={},r.bits_data[t])r.bits_data_temp[t][e]=r.bits_data[t][e];let n=null;if(Array.isArray(e)&&e.forEach(t=>{let e=null;t.forEach(t=>{let[n,o]=t;if(!r.bits_data_temp[n])throw Error("Panic. The key does not exist in facets lists.");let i=r.bits_data_temp[n][o];e=i?e?e.new_intersection(i):i:new eQ}),e&&(n=n?n.new_union(e):e)}),null!==n)for(let t in r.bits_data_temp)for(let e in r.bits_data_temp[t])r.bits_data_temp[t][e]=r.bits_data_temp[t][e].new_intersection(n);return r}(i,e5(t.filters_query).map(t=>Array.isArray(t)?t.map(t=>Array.isArray(t)?t.map(t=>t):t.split(":")):t.split(":")))),n.bits_data_temp=i.bits_data_temp;let s=n.bits_data_temp;if(e.query_ids)for(let t in s)for(let r in s[t])s[t][r]=e.query_ids.new_intersection(s[t][r]);if(e.test)for(let t in n.data={},s)for(let e in n.data[t]={},s[t])n.data[t][e]=s[t][e].array();return n.ids=t.filters_query?Object.values(s).reduce((t,e)=>(Object.values(e).forEach(e=>{t=t.new_union(e)}),t),new eQ([])):eX(s,t.filters),n}_loadFromSnapshot(t){let e={data:Object.create(null),bits_data:Object.create(null),bits_data_temp:Object.create(null)};if(t.bitsData)for(let r in t.bitsData)for(let n in e.bits_data[r]=Object.create(null),t.bitsData[r])e.bits_data[r][n]=new eQ(t.bitsData[r][n]);return e}constructor(t,e){var r;(e=e||Object.create(null)).aggregations=e.aggregations||Object.create(null),this._items=t,this.config=e.aggregations;let n=e.custom_id_field||"id";
1this.facets=e.facetsSnapshot?this._loadFromSnapshot(e.facetsSnapshot):function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r={data:Object.create(null),bits_data:Object.create(null),bits_data_temp:Object.create(null)},n=1;return e.forEach(t=>{r.data[t]=Object.create(null)}),t.forEach(t=>{t._id||(t._id=n++)}),t.forEach(t=>{e.forEach(e=>{let n=t[e];Array.isArray(n)?n.forEach(n=>{r.data[e][n]||(r.data[e][n]=[]),r.data[e][n].push(t._id)}):void 0!==n&&(r.data[e][n]||(r.data[e][n]=[]),r.data[e][n].push(t._id))})}),Object.keys(r.data).forEach(t=>{r.bits_data[t]=Object.create(null),r.bits_data_temp[t]=Object.create(null);let e=r.data[t];Object.keys(e).forEach(n=>{let o=e[n].sort((t,e)=>t-e);r.bits_data[t][n]=new eQ(o),r.data[t][n]=o})}),r}(t,tS(e.aggregations)),this._items_map=Object.create(null),this._ids=[];let o=1;r=t=>{var r,i;if(null!=(r=e.facetsSnapshot)&&r.idsMap&&t[n]){let r=e.facetsSnapshot.idsMap[t[n]];void 0!==r&&(t._id=r)}else null!=(i=e.facetsSnapshot)&&i.ids&&e.facetsSnapshot.ids.length>=o?t._id=e.facetsSnapshot.ids[o-1]:null==t._id&&(t._id=o);this._ids.push(t._id),this._items_map[t._id]=t,++o},(j(t)?m:eq)(t,eR(r)),this.ids_map=Object.create(null),t&&t.forEach(t=>{t[n]&&t._id&&(this.ids_map[t[n]]=t._id)}),this._bits_ids=new eQ(this._ids)}}function rt(t,e){let r;!1!==(e=e||Object.create(null)).native_search_enabled&&(r=new e8(t,e));let n=new e9(t,e);return{search:function(o){var i;o=o||Object.create(null);let s=e;if(o.facets){let{aggregations:t,filters:r}=e4(o.facets,e);if(s=a({},e,{aggregations:t}),r&&(o.filters=a({},o.filters||{},r)),!o.filters_query){let t=function(t,e){if(!t||"object"!=typeof t)return;let r=e&&e.aggregations||{},n=[];return Object.keys(t).forEach(e=>{var o,i,s;let a;if(!r[e])return;let l=(null==(o=t[e])?void 0:o.selected)||[];if(!Array.isArray(l)||0===l.length)return;let c=e2(null==(i=t[e])||null==(s=i.options)?void 0:s.conjunction),u=l.map(t=>{let r=String(t);return r.includes(" ")||r.includes(":")?"".concat(e,':"').concat(r.replace(/"/g,'\\"'),'"'):"".concat(e,":").concat(r)});a="OR"===c?u.length>1?"(".concat(u.join(" OR "),")"):u[0]:u.join(" AND "),n.push(a)}),n.length?n.join(" AND "):void 0}(o.facets,s);t&&(o.filters_query=t)}n.config=s.aggregations}else n.config=e.aggregations;o.aggregations=function(t,e){let r={};for(let n in t){let o=a({},t[n]);o.field=o.field||n,o.filters=e.filters&&e.filters[n]||[],o.not_filters=e.exclude_filters&&e.exclude_filters[n]||e.not_filters&&e.not_filters[n]||[],r[n]=o}return r}(s.aggregations,o);let l=e6(t,o,s,r,n);return null!=l&&null!=(i=l.data)&&i.aggregations&&!l.data.facets&&(l.data.facets=l.data.aggregations),l},similar:function(e,r){return function(t,e,r){let n,o=(r=r||Object.create(null)).per_page||10,i=r.minimum||0,s=r.page||1;for(let r=0;r<t.length;++r)if(t[r].id==e){n=t[r];break}if(!n)return{pagination:{per_page:o,page:s,total:0},data:{items:[]}};if(!r.field)throw Error("Please define field in options");let l=r.field,c=[];for(let r=0;r<t.length;++r)if(t[r].id!==e){let e=eH(n[l],t[r][l]);e.length>=i&&c.push(a({},t[r],{intersection_length:e.length}))}return{pagination:{per_page:o,page:s,total:(c=eY(c,["intersection_length"],["desc"])).length},data:{items:c.slice((s-1)*o,s*o)}}}(t,e,r)},aggregation:function(o){let i=e;if(null!=o&&o.facets){let{aggregations:t}=e4(o.facets,e);i=a({},e,{aggregations:t}),n.config=i.aggregations}else n.config=e.aggregations;var s=t,l=i,c=r,u=n;let h=o.per_page||10,f=o.page||1;if(o.name&&(!l.aggregations||!l.aggregations[o.name]))throw Error('Please define aggregation "'.concat(o.name,'" in config'));let d=function(t){try{return structuredClone(t)}catch(e){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}}(o);if(d.page=1,d.per_page=0,!o.name)throw Error("field name is required");let p=e6(s,d,a({},l,{aggregations:a({},l.aggregations,{[o.name]:a({},l.aggregations[o.name],{size:1e4})})}),c,u).data.aggregations[o.name].buckets;return{pagination:{per_page:h,page:f,total:p.length},data:{buckets:p.slice((f-1)*h,f*h)}}},reindex:function(o){r=new e8(t=o,e),n=new e9(t,e)},serializeFulltext:function(){return r?r.serialize():null}
1,serializeFacets:function(){return n.serialize()},serializeAll:function(){return{version:"itemsjs-snapshot-v1",fulltext:this.serializeFulltext(),facets:this.serializeFacets()}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.