!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.infisearch=n():t.infisearch=n()}(self,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var i in e)t.o(e,i)&&!t.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:e[i]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},n={};t.d(n,{default:()=>Zt});function e(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function i(t,n,e){for(const r of t){const t=r.isSubtracted||r.isInverted?!e:e;r.termsSearched?t&&n.push([...r.termsSearched]):r.children&&i(r.children,n,t)}}function r(t,n){const r=[],o=[];i(t,o,!0);const s=[];for(const t of o){const i=t.map((t=>(s.push(t),e(t)))).sort(((t,n)=>n.length-t.length)).join("|");if("ascii_stemmer"===n.langConfig.lang){const t=new RegExp(`(^|\\W|_)(${i})(\\w*?)(?=\\W|$)`,"gi");r.push(t)}else{const t=new RegExp(`(^|\\W|_)(${i})((?=\\W|$))`,"gi");r.push(t)}}return[r,JSON.stringify(s)]}class o{constructor(t,n,e,i,r,o){this.query=t,this.resultsTotal=n,this.queryParts=e,this.getNextN=i,this.free=r,this.t=o}}function s(t,n,e){const{numDocsPerStore:i,numStoresPerDir:r,indexingConfig:o,indexVer:s}=e,{numDocsPerBlock:c}=o,a=Math.floor(n/i),l=Math.floor(n/c);return`${t}${s}/field_store/${Math.floor(a/r)}/${l}/${a}.json`}const c=function(t,n,...e){const i=document.createElement(t);return Object.entries(n).forEach((([t,n])=>{i.setAttribute(t,n)})),i.append(...e),i};function a(){return c("span",{class:"infi-ellipses"}," ... ")}function l(t){return c("mark",{class:"infi-highlight"},t)}var u;!function(t){t.CONTENT_AND_HEADING="heading-content",t.CONTENT="content",t.HEADING_ONLY="heading"}(u||(u={}));class f{constructor(t,n,e,i,r){this.type=t,this.text=n,this.headingLink=i,this.heading=r,this.window=[],this.numTerms=0;const o=e.map((t=>Array.from(n.matchAll(t))));if(!o.some((t=>t.length)))return;let s=e.map((()=>-1)),c=1e7,a=e.map((()=>0));const l=o.map((()=>0)),u=o.map((t=>!t.length)),f=o.map((()=>-1));for(;;){let t=1e7,n=1e7,e=-1,i=0;for(let r=0;ro[n][t]&&o[n][t][2].length+o[n][t][3].length))),l[e]+=1,l[e]>=o[e].length&&(u[e]=!0,l[e]-=1,u.every((t=>t))))break}const d=s.map(((t,n)=>({pos:t,len:a[n]}))).filter((t=>t.pos>=0)).sort(((t,n)=>t.pos-n.pos));this.window=d,this.numTerms=d.length}highlight(t=!0){const{text:n,window:e}=this;if(!e.some((({pos:t})=>t>=0))){if(t){const t=n.trimStart().substring(0,80);return[80===t.length?t.replace(/\w+$/,""):t,a()]}return[n]}const i=[];let r=0;for(const{pos:o,len:s}of e){const e=o+s;if(o>r+80){t&&i.push(a());const r=n.substring(o-40,o);i.push(40===r.length?r.replace(/^\w+/,""):r),i.push(l(n.substring(o,e)))}else if(o>=r)i.pop(),i.push(n.substring(r,o)),i.push(l(n.substring(o,e)));else{if(!(e>r))continue;i.pop();i[i.length-1].textContent+=n.substring(r,e)}const c=n.substring(e,e+40);i.push(40===c.length?c.replace(/\w+$/,""):c),r=e}return t&&i.push(a()),i}highlightHTML(t=!0){const n=this.highlight(t);return c("div",{},...n).innerHTML}}var d=function(t,n,e,i){return new(e||(e=Promise))((function(r,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}a((i=i.apply(t,n||[])).next())}))};class h{constructor(t,n){this.fields=t,this.i=n}static l(t,n,e,i,r,o,c,a){return d(this,void 0,void 0,(function*(){const l=n.getUint32(t,!0);t+=4;const u=s(i,l,o),f=yield r.getJson(u);let d=l%o.numDocsPerStore;const{numDocsPerBlock:p}=o.indexingConfig;pp(this,void 0,void 0,(function*(){m+=1,yield t(),m-=1}));m>=2?y.push(n):(yield n(),_())}))}class w{constructor(t){this.cache=t,this.u=Object.create(null)}h(t){return p(this,void 0,void 0,(function*(){if(this.cache){let n=yield this.cache.match(t);n?this.u[t]=n.json():b((()=>p(this,void 0,void 0,(function*(){yield this.cache.add(t),n=yield this.cache.match(t),this.u[t]=n.json()}))))}else b((()=>p(this,void 0,void 0,(function*(){const n=yield fetch(t);this.u[t]=n.json()}))))}))}p(t){return p(this,void 0,void 0,(function*(){if(this.cache){(yield this.cache.match(t))||b((()=>this.cache.add(t)))}}))}getJson(t){return this.u[t]||(this.u[t]=fetch(t).then((t=>t.json()))),this.u[t]}}var g=function(t,n,e,i){return new(e||(e=Promise))((function(r,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}a((i=i.apply(t,n||[])).next())}))};let v;if(document.currentScript)v=document.currentScript.src;else{const t=document.getElementsByTagName("script");v=t.length&&t[t.length-1].src}v=v.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");const x={s:""};const P=class{constructor(t){if(this.m=t,this.isSetupDone=!1,this._=Object.create(null),this.id=0,"object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiateStreaming)return void(this.setupPromise=Promise.reject("WA unsupported"));!function(t){if(!("url"in t))throw new Error("Mandatory url parameter not specified");t.url.endsWith("/")||(t.url+="/"),t.url.startsWith("/")&&(t.url=window.location.origin+t.url),"maxAutoSuffixSearchTerms"in t||(t.maxAutoSuffixSearchTerms=3),"maxSuffixSearchTerms"in t||(t.maxSuffixSearchTerms=5),"useQueryTermProximity"in t||(t.useQueryTermProximity=!0),"plLazyCacheThreshold"in t||(t.plLazyCacheThreshold=0),"resultLimit"in t||(t.resultLimit=null)}(this.m);const n=this.g().then((()=>this.v(`infi:${t.url}`)));this.setupPromise=Promise.all([n,new Promise(((t,e)=>{const i=URL.createObjectURL(new Blob([`const __morsWrkrUrl="${v}";${x.s}`],{type:"text/javascript"}));this.P=new Worker(i),this.P.onmessage=e=>{if(e.data.query){const{query:t,queryId:n,nextResults:i,resultsTotal:r,queryParts:o}=e.data,s=this._[n];s&&s.resolve({query:t,nextResults:i,resultsTotal:r,queryParts:o})}else""===e.data?(n.then((()=>this.P.postMessage(this.cfg))),URL.revokeObjectURL(i)):e.data.isSetupDone&&(this.isSetupDone=!0,t(),this.S(),this.k())},this.P.onmessageerror=t=>{console.error(t),this.isSetupDone||e()}}))])}v(t){return g(this,void 0,void 0,(function*(){try{const{indexVer:n}=this.cfg;let e=yield caches.open(t);const i=yield e.match("/index_ver");if(i){n!==(yield i.text())&&(yield caches.delete(t),e=yield caches.open(t))}yield e.put("/index_ver",new Response(n)),this.A=new w(e)}catch(t){this.A=new w(void 0)}}))}S(){if(!this.m.cacheAllFieldStores)return;const{numDocsPerStore:t,indexingConfig:n,lastDocId:e}=this.cfg,i=Math.min(t,n.numDocsPerBlock);for(let t=0;t{const n=Math.floor(t/this.cfg.indexingConfig.numPlsPerDir);this.A.p(`${this.m.url}${this.cfg.indexVer}/pl_${n}/pl_${t}.mls`)}))}g(){return g(this,void 0,void 0,(function*(){const t=this.m;if(this.cfg=yield(yield fetch(`${t.url}output_config.json`,{cache:"no-store"})).json(),"0.10.1"!==this.cfg.ver)throw new Error("InfiSearch: search !== indexer version!");"cacheAllFieldStores"in t||(t.cacheAllFieldStores=!!this.cfg.cacheAllFieldStores),t.useQueryTermProximity=t.useQueryTermProximity&&this.cfg.indexingConfig.withPositions,this.cfg.searcherOptions=t,this.$=this.cfg.fieldInfos.filter((t=>t.enumInfo)).sort(((t,n)=>t.enumInfo.enumId-n.enumInfo.enumId)),this.j=this.cfg.fieldInfos.filter((t=>t.i64Info)).sort(((t,n)=>t.i64Info.id-n.i64Info.id))}))}getEnumValues(t){return g(this,void 0,void 0,(function*(){yield this.setupPromise;const n=this.cfg.fieldInfos.find((n=>n.name===t)),e=null==n?void 0:n.enumInfo;return e?e.enumValues:null}))}runQuery(t,n={}){return g(this,void 0,void 0,(function*(){yield this.setupPromise,n.enumFilters=n.enumFilters||{},n.i64Filters=n.i64Filters||{},n.sort=n.sort||null,n.sortAscending=n.sortAscending||!1;const e=this.id;this.id+=1;const i=this._;i[e]={promise:void 0,resolve:void 0},i[e].promise=new Promise((r=>{i[e].resolve=r,this.P.postMessage({query:t,queryId:e,opts:n})}));const s=yield i[e].promise,[c,a]=r(s.queryParts,this.cfg);return new o(t,s.resultsTotal,s.queryParts,(n=>g(this,void 0,void 0,(function*(){if(!i[e])return[];if(yield i[e].promise,i[e].promise=new Promise((r=>{i[e].resolve=r,this.P.postMessage({query:t,queryId:e,isGetNextN:!0,n})})),!i[e])return[];const{nextResults:r}=yield i[e].promise,o=new DataView(r),s=[],a=4+this.$.length+8*this.j.length;for(let t=0;t{delete i[e],this.P.postMessage({query:t,isFree:!0})}),a)}))}free(){this.P.terminate()}};var S;function k(t,n){const e=getComputedStyle(n);if(["scroll","auto","overlay"].includes(e.overflowY)){const e=t.offsetTop-n.offsetTop-n.clientHeight/2+t.clientHeight/2;n.scrollTo({top:e})}else t.scrollIntoView({block:"center"})}x.s='(()=>{var t,n,e,r,o={899:(t,n,e)=>{e.p=__morsWrkrUrl},464:(t,n,e)=>{"use strict";e.a(t,(async(t,r)=>{try{e.d(n,{get_new_searcher:()=>o.qS,get_query:()=>o.R1});var o=e(642),i=t([o]);o=(i.then?(await i)():i)[0],r()}catch(t){r(t)}}))},642:(t,n,e)=>{"use strict";e.a(t,(async(r,o)=>{try{e.d(n,{G6:()=>M,JP:()=>H,Or:()=>X,QF:()=>V,R1:()=>P,UA:()=>G,VD:()=>F,XG:()=>z,XP:()=>D,bj:()=>W,fP:()=>R,ff:()=>T,gi:()=>K,hK:()=>N,jp:()=>J,lB:()=>B,oH:()=>C,qS:()=>S,ug:()=>k});var i=e(515),c=e(273);t=e.hmd(t);var u=r([c]);c=(u.then?(await u)():u)[0];const s=new Array(32).fill(void 0);function f(t){return s[t]}s.push(void 0,null,!0,!1);let a=s.length;function _(t){t<36||(s[t]=a,a=t)}function l(t){const n=f(t);return _(t),n}function d(t){a===s.length&&s.push(s.length+1);const n=a;return a=s[n],s[n]=t,n}let y=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});y.decode();let w=new Uint8Array;function b(){return 0===w.byteLength&&(w=new Uint8Array(c.memory.buffer)),w}function h(t,n){return y.decode(b().subarray(t,t+n))}function v(t,n,e,r){const o={a:t,b:n,cnt:1,dtor:e},i=(...t)=>{o.cnt++;const n=o.a;o.a=0;try{return r(n,o.b,...t)}finally{0==--o.cnt?c.__wbindgen_export_0.get(o.dtor)(n,o.b):o.a=n}};return i.original=o,i}function g(t,n,e){c._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf06d5548831c85d9(t,n,d(e))}let p=new Int32Array;function m(){return 0===p.byteLength&&(p=new Int32Array(c.memory.buffer)),p}let x=0;let j=new("undefined"==typeof TextEncoder?(0,t.require)("util").TextEncoder:TextEncoder)("utf-8");const A="function"==typeof j.encodeInto?function(t,n){return j.encodeInto(t,n)}:function(t,n){const e=j.encode(t);return n.set(e),{read:t.length,written:e.length}};function O(t,n,e){if(void 0===e){const e=j.encode(t),r=n(e.length);return b().subarray(r,r+e.length).set(e),x=e.length,r}let r=t.length,o=n(r);const i=b();let c=0;for(;c127)break;i[o+c]=n}if(c!==r){0!==c&&(t=t.slice(c)),o=e(o,r,r=c+3*t.length);const n=b().subarray(o+c,o+r);c+=A(t,n).written}return x=c,o}function q(t){return null==t}function S(t,n,e,r,o,i,u,s,f,a,_,l,y,w,b,h,v){const g=O(r,c.__wbindgen_malloc,c.__wbindgen_realloc),p=x;var m=q(u)?0:O(u,c.__wbindgen_malloc,c.__wbindgen_realloc),j=x;const A=O(_,c.__wbindgen_malloc,c.__wbindgen_realloc),S=x,P=O(l,c.__wbindgen_malloc,c.__wbindgen_realloc),U=x,$=c.get_new_searcher(d(t),n,e,g,p,d(o),q(i)?16777215:i?1:0,m,j,!q(s),q(s)?0:s,d(f),a,A,S,P,U,y,w,b,h,!q(v),q(v)?0:v);return I.__wrap($)}function P(t,n){return l(c.get_query(t,d(n)))}function U(t,n){try{return t.apply(this,n)}catch(t){c.__wbindgen_exn_store(d(t))}}function $(t,n,e,r){c.wasm_bindgen__convert__closures__invoke2_mut__h668a0ca803c0613b(t,n,d(e),d(r))}class E{static __wrap(t){const n=Object.create(E.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();c.__wbg_query_free(t)}get results_total(){return c.__wbg_get_query_results_total(this.ptr)>>>0}set results_total(t){c.__wbg_set_query_results_total(this.ptr,t)}get_next_n(t){try{const u=c.__wbindgen_add_to_stack_pointer(-16);c.query_get_next_n(u,this.ptr,t);var n=m()[u/4+0],e=m()[u/4+1],r=(o=n,i=e,b().subarray(o/1,o/1+i)).slice();return c.__wbindgen_free(n,1*e),r}finally{c.__wbindgen_add_to_stack_pointer(16)}var o,i}get_query_parts(){try{const e=c.__wbindgen_add_to_stack_pointer(-16);c.query_get_query_parts(e,this.ptr);var t=m()[e/4+0],n=m()[e/4+1];return h(t,n)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_free(t,n)}}}class I{static __wrap(t){const n=Object.create(I.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();c.__wbg_searcher_free(t)}get_ptr(){return c.searcher_get_ptr(this.ptr)}}function k(t){l(t)}function M(t){const n=l(t).original;if(1==n.cnt--)return n.a=0,!0;return!1}function T(t){return d(E.__wrap(t))}function F(){return U((function(t,n,e){return d(f(t).call(f(n),f(e)))}),arguments)}function B(t){return d(new Uint8Array(f(t)))}function D(t){return void 0===f(t)}function N(t,n,e,r,o,c,u){return d((0,i.T)(t>>>0,n>>>0,h(e,r),h(o,c),u>>>0))}function G(t,n,e){return d(f(t).then(f(n),f(e)))}function V(t,n){try{var e={a:t,b:n};const r=new Promise(((t,n)=>{const r=e.a;e.a=0;try{return $(r,e.b,t,n)}finally{e.a=r}}));return d(r)}finally{e.a=e.b=0}}function W(t){return f(t).length}function C(){return d(c.memory)}function J(t){return d(f(t).buffer)}function R(t,n,e){f(t).set(f(n),e>>>0)}function X(t,n){throw new Error(h(t,n))}function z(t,n){return d(f(t).then(f(n)))}function H(t){return d(Promise.resolve(f(t)))}function K(t,n,e){return d(v(t,n,15,g))}o()}catch(Q){o(Q)}}))},515:(t,n,e)=>{"use strict";async function r(t,n,e,r,o){const i=`${r}pl_${Math.floor(t/n)}/pl_${t}.mls`,c=`infi:${e}`;function u(t){return fetch(t).then((t=>t.arrayBuffer()))}try{const t=await caches.open(c),n=await t.match(i);if(n)return await n.arrayBuffer();{const n=await u(i);return n.byteLength>=o&&t.add(i),n}}catch{return u(i)}}e.d(n,{T:()=>r})},273:(t,n,e)=>{"use strict";e.a(t,(async(r,o)=>{try{var i,c=r([i=e(642)]),[i]=c.then?(await c)():c;await e.v(n,t.id,"5a0a23bf2f3b5f806fb6",{"./index_bg.js":{__wbindgen_object_drop_ref:i.ug,__wbindgen_cb_drop:i.G6,__wbg_query_new:i.ff,__wbg_call_168da88779e35f61:i.VD,__wbg_new_8c3f0052272a457a:i.lB,__wbindgen_is_undefined:i.XP,__wbg_fetchPl_7df621436cba6bc1:i.hK,__wbg_then_cedad20fbbd9418a:i.UA,__wbg_new_9962f939219f1820:i.QF,__wbg_length_9e1ae1900cb0fbd5:i.bj,__wbindgen_memory:i.oH,__wbg_buffer_3f3d764d4747d564:i.jp,__wbg_set_83db9690f9353e79:i.fP,__wbindgen_throw:i.Or,__wbg_then_11f7a54d67b4bfad:i.XG,__wbg_resolve_99fe17964f31ffc0:i.JP,__wbindgen_closure_wrapper93:i.gi}}),o()}catch(t){o(t)}}),1)}},i={};function c(t){var n=i[t];if(void 0!==n)return n.exports;var e=i[t]={id:t,loaded:!1,exports:{}};return o[t](e,e.exports,c),e.loaded=!0,e.exports}t="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",n="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",e="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=t=>{t&&!t.d&&(t.d=1,t.forEach((t=>t.r--)),t.forEach((t=>t.r--?t.r++:t())))},c.a=(o,i,c)=>{var u;c&&((u=[]).d=1);var s,f,a,_=new Set,l=o.exports,d=new Promise(((t,n)=>{a=n,f=t}));d[n]=l,d[t]=t=>(u&&t(u),_.forEach(t),d.catch((t=>{}))),o.exports=d,i((o=>{var i;s=(o=>o.map((o=>{if(null!==o&&"object"==typeof o){if(o[t])return o;if(o.then){var i=[];i.d=0,o.then((t=>{c[n]=t,r(i)}),(t=>{c[e]=t,r(i)}));var c={};return c[t]=t=>t(i),c}}var u={};return u[t]=t=>{},u[n]=o,u})))(o);var c=()=>s.map((t=>{if(t[e])throw t[e];return t[n]})),f=new Promise((n=>{(i=()=>n(c)).r=0;var e=t=>t!==u&&!_.has(t)&&(_.add(t),t&&!t.d&&(i.r++,t.push(i)));s.map((n=>n[t](e)))}));return i.r?f:c()}),(t=>(t?a(d[e]=t):f(l),r(u)))),u&&(u.d=0)},c.d=(t,n)=>{for(var e in n)c.o(n,e)&&!c.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},c.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),c.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),c.v=(t,n,e,r)=>{var o=fetch(c.p+""+e+".module.wasm");return"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(o,r).then((n=>Object.assign(t,n.instance.exports))):o.then((t=>t.arrayBuffer())).then((t=>WebAssembly.instantiate(t,r))).then((n=>Object.assign(t,n.instance.exports)))},c.p="/",(()=>{"use strict";c(899);let t=new TextEncoder;class n{constructor(t,n,e){this.t=t,this.i=n,this.u=e}_(t){return this.u.get_next_n(t).buffer}l(){this.u.free()}}var e=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function c(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(c,u)}s((r=r.apply(t,n||[])).next())}))};const r=Object.create(null);let o,i,u;function s(c,s,f){return e(this,void 0,void 0,(function*(){const e=yield o.get_query(i.get_ptr(),function(n,e,r){const{enumFilters:o,i64Filters:i,sort:c,sortAscending:u}=e,{fieldInfos:s}=r,f=Object.entries(o),a=Object.entries(i),_=t.encode(n),l=_.length,d=Object.values(o).reduce(((t,n)=>t+n.length),0),y=new DataView(new ArrayBuffer(9+l+2*f.length+d+20*a.length));let w=4;function b(t){y.setUint8(w,t),w+=1}function h(t){y.setBigInt64(w,BigInt(t),!0),w+=8}y.setUint32(0,l,!0),_.forEach(b);const v=w;y.setUint8(v,0),w+=1,f.forEach((([t,n])=>{const e=s.find((n=>n.name===t));if(e){const{enumId:t,enumValues:r}=e.enumInfo;b(t);const o=n.filter((t=>null===t||r.includes(t))).map((t=>null===t?0:r.findIndex((n=>n===t))+1));b(o.length),o.forEach(b),y.setUint8(v,y.getUint8(v)+1)}}));const g=w;y.setUint8(g,0),w+=1,a.forEach((([t,{gte:n,lte:e}])=>{const r=s.find((n=>n.name===t));if(r){b(r.i64Info.id);const t=void 0!==n;b(t?1:0),t&&h(n);const o=void 0!==e;b(o?1:0),o&&h(e),y.setUint8(g,y.getUint8(g)+1)}}));const p=s.find((t=>t.name===c));return p?(b(1),b(p.i64Info.id)):b(0),b(u?1:0),new Uint8Array(y.buffer)}(c,s,u)),a=e.get_query_parts();let _=[];try{_=JSON.parse(a)}catch(t){console.error(`Error deserializing query parts:\\n${a}\\n${t}`)}return r[f]=new n(_,e.results_total,e),r[f]}))}function f(t,n){return e(this,void 0,void 0,(function*(){u=t;const{indexVer:r,indexingConfig:c,langConfig:{lang:s,options:f},fieldInfos:a,numScoredFields:_,searcherOptions:l}=u,d=`${l.url}${r}/`,y=function(t,n){return e(this,void 0,void 0,(function*(){let e;try{e=yield caches.open(`infi:${t}`)}catch(t){}const r=`${n}metadata.json`;return(e?e.match(r).then((t=>!t&&e.add(r))).then((()=>e.match(r))).catch((()=>fetch(r))):fetch(r)).then((t=>t.arrayBuffer()))}))}(l.url,d),w=new TextEncoder;let b;const h=f.stop_words;if(h){const t=h.map((t=>w.encode(t))).filter((t=>t.length<255)),n=t.length+t.reduce(((t,n)=>t+n.length),0);b=new Uint8Array(n);let e=0;t.forEach((t=>{b[e++]=t.length,b.set(t,e),e+=t.length}))}const v=a.map((t=>w.encode(t.name))),g=v.reduce(((t,n)=>t+n.length),0),p=new Uint8Array(13*v.length+g),m=new Float32Array(3);let x=0;a.forEach(((t,n)=>{const e=v[n].length;p[x++]=e,p.set(v[n],x),x+=e,m[0]=t.weight,m[1]=t.k,m[2]=t.b,p.set(new Uint8Array(m.buffer),x),x+=12})),o=yield n,i=o.get_new_searcher(yield y,c.numPlsPerDir,c.withPositions,s,b,f.ignore_stop_words,f.stemmer,f.max_term_len,p,_,l.url,d,l.maxAutoSuffixSearchTerms,l.maxSuffixSearchTerms,l.useQueryTermProximity,l.plLazyCacheThreshold,l.resultLimit)}))}var a=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function c(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(c,u)}s((r=r.apply(t,n||[])).next())}))};!function(t){onmessage=function(n){return a(this,void 0,void 0,(function*(){const e=n.data;if(e.searcherOptions)yield f(e,t),postMessage({isSetupDone:!0});else if(e.query){const{query:t,opts:n,queryId:o,n:i,isFree:c,isGetNextN:u}=e;if(c)!function(t){r[t]&&(r[t].l(),delete r[t])}(o);else if(u){const n=function(t,n){var e;return(null===(e=r[t])||void 0===e?void 0:e._(n))||new ArrayBuffer(0)}(o,i);postMessage({query:t,queryId:o,nextResults:n},[n])}else{const e=yield s(t,n,o);postMessage({query:t,queryId:o,resultsTotal:e.i,queryParts:e.t})}}}))},postMessage("")}(Promise.resolve().then(c.bind(c,464)))})()})();',function(t){t.Auto="auto",t.Dropdown="dropdown",t.Fullscreen="fullscreen",t.Target="target"}(S||(S={}));const A="infi-list-selected";function E(t,n,e,i,r){n&&(n.classList.remove("focus"),n.removeAttribute("aria-selected"),n.removeAttribute("id")),t?(t.classList.add("focus"),t.setAttribute("aria-selected","true"),t.setAttribute("id",A),r&&k(t,i),e.setAttribute("aria-activedescendant",A)):(r&&i.scrollTo({top:0}),$(e))}function $(t){t.removeAttribute("aria-activedescendant")}function j(t){t.setAttribute("aria-expanded","false")}function O(t,n,e){t.setAttribute("role","combobox"),t.setAttribute("autocomplete","off"),t.setAttribute("aria-autocomplete","list");const i=n.getAttribute("id");t.setAttribute("aria-controls",i),j(t),n.setAttribute("role","listbox"),n.setAttribute("aria-label",e)}const q="infi-multi-opt-enter";let T=0;function R(t,n){const e=T++,i="infi-multi-opts-"+e,r=c("div",{class:"infi-multi-listbox",id:i,role:"listbox","aria-multiselectable":"true","aria-label":"filter options"}),o=c("div",{class:"infi-multi-header",tabindex:"0",role:"combobox","aria-expanded":"false","aria-label":"filter"},n.O);function s(t,n){n&&n.classList.remove("focus"),t?(t.classList.add("focus"),o.setAttribute("aria-activedescendant",t.getAttribute("id")),k(t,r)):$(o)}function a(){const t=r.querySelectorAll('[role="option"]');let n,e=-1;return t.forEach(((t,i)=>{t.getAttribute("id")===o.getAttribute("aria-activedescendant")&&(n=t,e=i)})),[e,n,t]}const l=n.q.map(((i,r)=>function(i,r){const o=c("input",{type:"checkbox",class:"infi-checkbox",role:"option","aria-selected":"false",id:`infi-multi-opt-${e}-${r}`}),l=c("div",{class:"infi-multi"},c("label",{class:"infi-checkbox-label"},o,i));function u(e){n.T[r]=o.checked,o.setAttribute("aria-selected",o.checked+"");const[,i]=a();e&&s(o,i),t.R.value&&t.F(t.R.value)}return o.onclick=t=>{t.stopPropagation(),u(!1)},o.addEventListener(q,(()=>{o.checked=!o.checked,u(!0)})),l}(i,r)));function u(){r.innerHTML="",r.append(...l),o.classList.add("active"),o.setAttribute("aria-expanded","true"),o.setAttribute("aria-controls",i)}let f=n.L;const d=()=>{f?function(){const[,t]=a();s(void 0,t),r.innerHTML="",o.classList.remove("active"),o.setAttribute("aria-expanded","false"),o.removeAttribute("aria-controls"),$(o)}():u(),f=!f};return f&&u(),o.onclick=d,o.onkeydown=t=>{if(!["ArrowDown","ArrowUp","Enter"," ","Home","End","Escape"].includes(t.key))return;const n=t.key;t.preventDefault();const[e,i,r]=a(),o=r[0],c=r[r.length-1];f?"ArrowDown"===n?s(r[(e+1)%r.length],i):"ArrowUp"===n?s(e>0?r[e-1]:c,i):"Enter"===n||" "===n?i?(i.dispatchEvent(new Event(q)),t.stopPropagation()):"Enter"===n&&d():"Home"===n?s(o,i):"End"===n?s(c,i):"Escape"===n&&(d(),t.stopPropagation()):"Enter"===n&&d()},c("div",{},o,r)}function F(t,n){const{type:e,displayName:i,minLabel:r,maxLabel:o}=n.U,s=e.startsWith("date"),a=r||(s?"After":"Min"),l=o||(s?"Before":"Max");function u(t){return c("span",{class:"infi-sr-only"},t)}function f(r,o){const a=c("input",{class:"infi-minmax",placeholder:r,type:e});var l;return a.onchange=(l=o,i=>{const r=i.target.value;let o;try{const t=r.split(".")[0];o="number"===e?t.trim()?BigInt(t):void 0:BigInt(+new Date(r))/BigInt(1e3)}catch(t){}l?n.M=o:n.D=o;const s=t.R.value;s&&t.F(s)}),c("label",{},u(i),s?c("span",{class:"infi-minmax-label"},r):u(r),a)}return c("div",{class:"infi-min-max"},c("div",{class:"infi-filter-header"},i),f(a,!0)," - ",f(l,!1))}function L(t,n,e){return c("option",{value:`${t}<->${n}`},e)}function U(t,n,e){const i=function(t,n){const{multiSelectFilters:e,numericFilters:i}=t.uiOptions,r=n.fieldInfos;return{B:e.filter((({fieldName:t})=>r.find((({name:n})=>t===n)))).map((({fieldName:t,displayName:n,defaultOptName:e,collapsed:i},o)=>{const s=[e,...r.find((({name:n})=>t===n)).enumInfo.enumValues];return{I:o,C:t,O:n,q:s,T:s.map((()=>!1)),L:void 0===i?0===o:i}})),N:i.filter((({fieldName:t})=>r.find((({name:n})=>t===n)))).map((t=>({U:t,M:t.gte,D:t.lte}))),W:null,H:!1}}(t,n),r=function(t,n,e){const{sortFields:i,translations:r}=n,o=Object.entries(i);if(!o.length)return"";const s=[c("option",{value:"relevance",selected:"true"},"Relevance")];o.forEach((([t,{asc:n,desc:e}])=>{n&&s.push(L(t,1,n)),e&&s.push(L(t,0,e))}));const a="infi-sort-"+T++,l=c("select",{class:"infi-sort",id:a},...s);return l.onchange=n=>{const[i,r]=n.target.value.split("<->");e.W=i,e.H=!!Number(r);const o=t.R.value;o&&t.F(o)},c("div",{},c("label",{class:"infi-filter-header",for:a},r.sortBy),l)}(e,t.uiOptions,i),o=i.N.map((t=>F(e,t))),s=i.B.map((t=>R(e,t))),a=r||o.length||s.length,l=c("div",{},r,r&&(o.length||s.length)?c("hr",{class:"infi-sep"}):"",...o,o.length&&s.length?c("hr",{class:"infi-sep"}):"",...s,a?c("hr",{class:"infi-sep"}):""),u=c("div",{class:"infi-filters"});let f=!1;const d=a?t=>void 0===t||f===t?f:(f?(l.remove(),u.classList.remove("shown")):(u.prepend(l),u.classList.add("shown")),f=t):void 0;return[u,i,d]}function M(t){return t.split("-")[0]}function D(t){return t.split("-")[1]}function B(t){return["top","bottom"].includes(M(t))?"x":"y"}function I(t){return"y"===t?"height":"width"}function C(t,n,e){let{reference:i,floating:r}=t;const o=i.x+i.width/2-r.width/2,s=i.y+i.height/2-r.height/2,c=B(n),a=I(c),l=i[a]/2-r[a]/2,u="x"===c;let f;switch(M(n)){case"top":f={x:o,y:i.y-r.height};break;case"bottom":f={x:o,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:s};break;case"left":f={x:i.x-r.width,y:s};break;default:f={x:i.x,y:i.y}}switch(D(n)){case"start":f[c]-=l*(e&&u?-1:1);break;case"end":f[c]+=l*(e&&u?-1:1)}return f}const N=async(t,n,e)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=e,c=o.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(n));let l=await s.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=C(l,i,a),d=i,h={},p=0;for(let e=0;e({name:"arrow",options:t,async fn(n){const{element:e,padding:i=0}=null!=t?t:{},{x:r,y:o,placement:s,rects:c,platform:a}=n;if(null==e)return{};const l=W(i),u={x:r,y:o},f=B(s),d=D(s),h=I(f),p=await a.getDimensions(e),m="y"===f?"top":"left",y="y"===f?"bottom":"right",_=c.reference[h]+c.reference[f]-u[f]-c.floating[h],b=u[f]-c.reference[f],w=await(null==a.getOffsetParent?void 0:a.getOffsetParent(e));let g=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0;0===g&&(g=c.floating[h]);const v=_/2-b/2,x=l[m],P=g-p[h]-l[y],S=g/2-p[h]/2+v,k=z(x,S,P),A=("start"===d?l[m]:l[y])>0&&S!==k&&c.reference[h]<=c.floating[h];return{[f]:u[f]-(A?SK[t]))}function Y(t,n,e){void 0===e&&(e=!1);const i=D(t),r=B(t),o=I(r);let s="x"===r?i===(e?"end":"start")?"right":"left":"start"===i?"bottom":"top";return n.reference[o]>n.floating[o]&&(s=X(s)),{main:s,cross:X(s)}}const Z={start:"end",end:"start"};function tt(t){return t.replace(/start|end/g,(t=>Z[t]))}const nt=["top","right","bottom","left"],et=(nt.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:i,middlewareData:r,rects:o,initialPlacement:s,platform:c,elements:a}=n,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",flipAlignment:h=!0,...p}=t,m=M(i),y=f||(m!==s&&h?function(t){const n=X(t);return[tt(t),n,tt(n)]}(s):[X(s)]),_=[s,...y],b=await Q(n,p),w=[];let g=(null==(e=r.flip)?void 0:e.overflows)||[];if(l&&w.push(b[m]),u){const{main:t,cross:n}=Y(i,o,await(null==c.isRTL?void 0:c.isRTL(a.floating)));w.push(b[t],b[n])}if(g=[...g,{placement:i,overflows:w}],!w.every((t=>t<=0))){var v,x;const t=(null!=(v=null==(x=r.flip)?void 0:x.index)?v:0)+1,n=_[t];if(n)return{data:{index:t,overflows:g},reset:{placement:n}};let e="bottom";switch(d){case"bestFit":{var P;const t=null==(P=g.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:P[0].placement;t&&(e=t);break}case"initialPlacement":e=s}if(i!==e)return{reset:{placement:e}}}return{}}}});const it=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(n){const{placement:e,rects:i,platform:r,elements:o}=n,{apply:s=(()=>{}),...c}=t,a=await Q(n,c),l=M(e),u=D(e);let f,d;"top"===l||"bottom"===l?(f=l,d=u===(await(null==r.isRTL?void 0:r.isRTL(o.floating))?"start":"end")?"left":"right"):(d=l,f="end"===u?"top":"bottom");const h=G(a.left,0),p=G(a.right,0),m=G(a.top,0),y=G(a.bottom,0),_={availableHeight:i.floating.height-(["left","right"].includes(e)?2*(0!==m||0!==y?m+y:G(a.top,a.bottom)):a[f]),availableWidth:i.floating.width-(["top","bottom"].includes(e)?2*(0!==h||0!==p?h+p:G(a.left,a.right)):a[d])};await s({...n,..._});const b=await r.getDimensions(o.floating);return i.floating.width!==b.width||i.floating.height!==b.height?{reset:{rects:!0}}:{}}}};function rt(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function ot(t){return rt(t).getComputedStyle(t)}function st(t){return ft(t)?(t.nodeName||"").toLowerCase():""}let ct;function at(){if(ct)return ct;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(ct=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),ct):navigator.userAgent}function lt(t){return t instanceof rt(t).HTMLElement}function ut(t){return t instanceof rt(t).Element}function ft(t){return t instanceof rt(t).Node}function dt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof rt(t).ShadowRoot||t instanceof ShadowRoot)}function ht(t){const{overflow:n,overflowX:e,overflowY:i,display:r}=ot(t);return/auto|scroll|overlay|hidden/.test(n+i+e)&&!["inline","contents"].includes(r)}function pt(t){return["table","td","th"].includes(st(t))}function mt(t){const n=/firefox/i.test(at()),e=ot(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function yt(){return!/^((?!chrome|android).)*safari/i.test(at())}function _t(t){return["html","body","#document"].includes(st(t))}const bt={x:1,y:1};function wt(t){const n=!ut(t)&&t.contextElement?t.contextElement:ut(t)?t:null;if(!n)return bt;const e=n.getBoundingClientRect(),i=ot(n);let r=e.width/parseFloat(i.width),o=e.height/parseFloat(i.height);return r&&Number.isFinite(r)||(r=1),o&&Number.isFinite(o)||(o=1),{x:r,y:o}}function gt(t,n,e,i){var r,o,s,c;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect();let l=bt;n&&(i?ut(i)&&(l=wt(i)):l=wt(t));const u=ut(t)?rt(t):window,f=!yt()&&e,d=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/l.x,h=(a.top+(f&&null!=(s=null==(c=u.visualViewport)?void 0:c.offsetTop)?s:0))/l.y,p=a.width/l.x,m=a.height/l.y;return{width:p,height:m,top:h,right:d+p,bottom:h+m,left:d,x:d,y:h}}function vt(t){return((ft(t)?t.ownerDocument:t.document)||window.document).documentElement}function xt(t){return ut(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Pt(t){return gt(vt(t)).left+xt(t).scrollLeft}function St(t,n,e){const i=lt(n),r=vt(n),o=gt(t,!0,"fixed"===e,n);let s={scrollLeft:0,scrollTop:0};const c={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==st(n)||ht(r))&&(s=xt(n)),lt(n)){const t=gt(n,!0);c.x=t.x+n.clientLeft,c.y=t.y+n.clientTop}else r&&(c.x=Pt(r));return{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function kt(t){if("html"===st(t))return t;const n=t.assignedSlot||t.parentNode||(dt(t)?t.host:null)||vt(t);return dt(n)?n.host:n}function At(t){return lt(t)&&"fixed"!==ot(t).position?t.offsetParent:null}function Et(t){const n=rt(t);let e=At(t);for(;e&&pt(e)&&"static"===ot(e).position;)e=At(e);return e&&("html"===st(e)||"body"===st(e)&&"static"===ot(e).position&&!mt(e))?n:e||function(t){let n=kt(t);for(;lt(n)&&!_t(n);){if(mt(n))return n;n=kt(n)}return null}(t)||n}const $t=Math.min,jt=Math.max;function Ot(t){const n=kt(t);return _t(n)?t.ownerDocument.body:lt(n)&&ht(n)?n:Ot(n)}function qt(t,n){var e;void 0===n&&(n=[]);const i=Ot(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=rt(i);return r?n.concat(o,o.visualViewport||[],ht(i)?i:[]):n.concat(i,qt(i))}function Tt(t,n,e){return"viewport"===n?H(function(t,n){const e=rt(t),i=vt(t),r=e.visualViewport;let o=i.clientWidth,s=i.clientHeight,c=0,a=0;if(r){o=r.width,s=r.height;const t=yt();(t||!t&&"fixed"===n)&&(c=r.offsetLeft,a=r.offsetTop)}return{width:o,height:s,x:c,y:a}}(t,e)):ut(n)?function(t,n){const e=gt(t,!0,"fixed"===n),i=e.top+t.clientTop,r=e.left+t.clientLeft,o=lt(t)?wt(t):{x:1,y:1},s=t.clientWidth*o.x,c=t.clientHeight*o.y,a=r*o.x,l=i*o.y;return{top:l,left:a,right:a+s,bottom:l+c,x:a,y:l,width:s,height:c}}(n,e):H(function(t){var n;const e=vt(t),i=xt(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=jt(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=jt(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let c=-i.scrollLeft+Pt(t);const a=-i.scrollTop;return"rtl"===ot(r||e).direction&&(c+=jt(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:c,y:a}}(vt(t)))}const Rt={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:i,strategy:r}=t;const o="clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let i=qt(t).filter((t=>ut(t)&&"body"!==st(t))),r=null;const o="fixed"===ot(t).position;let s=o?kt(t):t;for(;ut(s)&&!_t(s);){const t=ot(s),n=mt(s);(o?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:i=i.filter((t=>t!==s)),s=kt(s)}return n.set(t,i),i}(n,this._c):[].concat(e),s=[...o,i],c=s[0],a=s.reduce(((t,e)=>{const i=Tt(n,e,r);return t.top=jt(i.top,t.top),t.right=$t(i.right,t.right),t.bottom=$t(i.bottom,t.bottom),t.left=jt(i.left,t.left),t}),Tt(n,c,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:i}=t;const r=lt(e),o=vt(e);if(e===o)return n;let s={scrollLeft:0,scrollTop:0},c={x:1,y:1};const a={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==st(e)||ht(o))&&(s=xt(e)),lt(e))){const t=gt(e);c=wt(e),a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+a.x,y:n.y*c.y-s.scrollTop*c.y+a.y}},isElement:ut,getDimensions:function(t){if(lt(t))return{width:t.offsetWidth,height:t.offsetHeight};const n=gt(t);return{width:n.width,height:n.height}},getOffsetParent:Et,getDocumentElement:vt,getScale:wt,async getElementRects(t){let{reference:n,floating:e,strategy:i}=t;const r=this.getOffsetParent||Et,o=this.getDimensions;return{reference:St(n,await r(e),i),floating:{x:0,y:0,...await o(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===ot(t).direction};const Ft=(t,n,e)=>{const i=new Map,r={platform:Rt,...e},o={...r.platform,_c:i};return N(t,n,{...r,platform:o})};function Lt(t,n,e,i,r,o){if(r)return c("div",{class:"infi-error"},o.error);if(e)return c("div",{class:"infi-blank"},o.startSearching);const s=c("span",{class:"infi-loading-indicator"});if(t){const t=c("div",{class:"infi-initialising-text"},o.startingUp);return c("div",{},s,t)}return i?c("div",{}):(n||s.classList.add("infi-loading-indicator-subsequent"),s)}var Ut=function(t,n,e,i){return new(e||(e=Promise))((function(r,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}a((i=i.apply(t,n||[])).next())}))};function Mt(t,n,e,i,r,o){return Ut(this,void 0,void 0,(function*(){const s=yield Promise.all(n.map((n=>t.uiOptions.listItemRender(c,t,n,e))));return s.push(function(t,n,e,i,r){const{resultsPerPage:o,translations:s}=t.uiOptions,a=c("div",{class:"infi-footer",tabindex:"-1"});if(!r.resultsTotal)return a;const l=c("div",{class:"infi-footer-so-far"},`${n} of ${r.resultsTotal}`).outerHTML,u=c("button",{class:"infi-load-more",tabindex:"-1",type:"button"},"Load more results"),f=c("div",{class:"infi-load-more-opt",role:"option"},u);return f.addEventListener("focusout",(t=>{t.stopPropagation()})),f.onclick=t=>{t.preventDefault();const n=document.activeElement===u;f.remove(),a.append(Lt(!1,!0,!1,!1,!1,s)),n&&a.focus({preventScroll:!0}),e(o).then((t=>{if(a.innerHTML=l,a.classList.add("infi-footer-loaded"),t&&t.length&&!n){const n=t[0];i("option"===n.getAttribute("role")?n:n.querySelector('[role="option"]'))}}))},n>=r.resultsTotal?a.innerHTML=l:a.append(f),a}(t,i+n.length,r,o,e)),s}))}var Dt=function(t,n,e,i){return new(e||(e=Promise))((function(r,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}a((i=i.apply(t,n||[])).next())}))};function Bt(t,n,e,i,r,o){return Dt(this,void 0,void 0,(function*(){if(n.V())return;const s=yield e.getNextN(i);if(n.V())return;const c=n.R,a=n.G.children[3],l=yield Mt(o,s,e,r,(i=>Bt(t,n,e,i,r+s.length,o)),(t=>E(t,a.querySelector("#infi-list-selected"),c,a,!1)));return r||(n.J(),n.K(e),a.innerHTML=""),a.append(...l),l}))}function It(t){return''}var Ct=function(t,n,e,i){return new(e||(e=Promise))((function(r,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,c)}a((i=i.apply(t,n||[])).next())}))};const Nt="infi-empty-input";class Wt{constructor(t,n,e,i){this.R=t,this.X=n,this.G=e,this.m=i,this.Y=!1;const r=this,o=e.children;var s,a,l;r.Z=o[0],r.tt=o[1],r.nt=o[2],r.et=o[3],s=t,a=r.et,l=e,s.addEventListener("keydown",(t=>{const{key:n}=t;if(!["ArrowDown","ArrowUp","Home","End","Enter"].includes(n))return;const e=a.querySelector("#infi-list-selected"),i=a.querySelectorAll('[role="option"]'),r=i[i.length-1];let o=-1;if(i.forEach(((t,n)=>{t===e&&(o=n)})),"ArrowDown"===n)E(i[(o+1)%i.length],e,s,l,!0);else if("ArrowUp"===n)E(o>0?i[o-1]:r,e,s,l,!0);else if("Enter"===n)e&&e.dispatchEvent(new MouseEvent("click",{ctrlKey:t.ctrlKey,cancelable:!0}));else{const t="Home"===n?0:s.value.length;s.focus(),s.setSelectionRange(t,t),E(void 0,e,s,l,!0)}t.preventDefault()})),r.it(),r.K(),r.rt((()=>Ct(this,void 0,void 0,(function*(){yield n.setupPromise;const t=n.cfg,[e,o,s]=U(i,t,r);r.ot=o,e.append(function(t,n){const{tip:e,translations:i}=t;if(!1===e)return"";function r(t){return c("code",{},t)}function o(...t){return c("tr",{class:"infi-tip-item"},...t.map((t=>c("td",{},c("div",{},t)))))}const s=c("tbody",{}),a=i.tipRows;n.indexingConfig.withPositions&&s.append(o(a.searchPhrases,r(a.exSearchPhrases))),s.append(o(a.requireTerm,r(a.exRequireTerm)),o(a.excludeTerm,r(a.exExcludeTerm)),o(a.flipResults,r(a.exFlipResults)),o(a.groupTerms,r(a.exGroupTerms)),o(a.searchPrefixes,r(a.exSearchPrefixes)),o(a.searchSections,c("ul",{},...a.exSearchSections.map((t=>c("li",{},r(t)))))));const l=c("table",{class:"infi-tip-table"},c("thead",{class:"infi-tip-table-header"},c("tr",{},c("th",{scope:"col"},i.tip),c("th",{},i.example))),s),u=c("div",{class:"infi-tip-popup-root"},c("div",{class:"infi-tip-popup"},c("div",{class:"infi-tip-popup-title"},i.tipHeader),l));let f=!1;function d(){f&&(u.classList.remove("shown"),f=!1)}u.ontransitionend=()=>{f||(u.style.transform="scale(0)")};const h=c("div",{class:"infi-tip-root",tabindex:"0"},c("span",{class:"infi-tip-icon"},"?"),u);function p(){f=!0,Ft(h,u,{placement:"top-end",middleware:[et({crossAxis:!1,flipAlignment:!0,padding:10,boundary:document.body})]}).then((({x:t,y:n})=>{Object.assign(u.style,{left:`${t}px`,top:`${n}px`,transform:"scale(1)"}),u.classList.add("shown")}))}return h.onmouseover=p,h.onfocus=p,h.onmouseleave=d,h.onblur=d,h}(i.uiOptions,t)),r.tt.replaceWith(e),r.tt=e,r.st=s,r.K()}))))}V(){return!!this.ct}J(t=!0,n=!1){const e=this,i=!e.et.childElementCount,r=Lt(!e.X.isSetupDone,i,!e.R.value,t,n,e.m.uiOptions.translations);e.nt.replaceWith(r),e.nt=r}K(t){const n=function(t,n,e){const i=c("div",{class:"infi-header"});t&&i.append(c("div",{class:"infi-results-found"},t.resultsTotal+e.numResultsFound));const r=c("div",{class:"infi-instructions"});if(r.innerHTML=e.navigation+It(!1)+It(!0)+'',i.append(r),n){const t=c("button",{class:"infi-filters"+(n()?" active":""),type:"button"},e.filtersButton);t.onclick=e=>{e.preventDefault(),n(!n())?t.classList.add("active"):t.classList.remove("active")},i.insertBefore(t,r)}return i}(t,this.st,this.m.uiOptions.translations);this.Z.replaceWith(n),this.Z=n}it(){this.R.value.length?this.G.classList.remove(Nt):this.G.classList.add(Nt)}at(){const t=this;t.it(),t.J(),t.K(),t.et.innerHTML="",$(t.R),j(t.R),t.Y?t.ct=()=>Promise.resolve():t.ct=void 0}F(t){this.it(),this.rt((()=>this.lt(t)))}lt(t){return Ct(this,void 0,void 0,(function*(){const n=this,e=n.m,{resultsPerPage:i}=e.uiOptions;$(n.R),n.R.setAttribute("aria-expanded","true");const r=n.ot,o=Object.create(null);r.B.forEach((t=>{const n=t.T;if(n.every((t=>t))||n.every((t=>!t)))return;const e=[];o[t.C]=e,n[0]&&e.push(null),e.push(...t.q.filter(((t,e)=>e>0&&n[e])))}));const s=Object.create(null);r.N.forEach((t=>{const n=void 0!==t.M,e=void 0!==t.D;if(!n&&!e)return;const i={};s[t.U.fieldName]=i,n&&(i.gte=t.M),e&&(i.lte=t.D)}));const c=r.W,a=r.H;n.ut&&n.ut.free();const l=n.X;n.ut=yield l.runQuery(t,{enumFilters:o,i64Filters:s,sort:c,sortAscending:a}),yield Bt(l,n,n.ut,i,0,e),n.G.scrollTo({top:0})}))}rt(t){return Ct(this,void 0,void 0,(function*(){const n=this;if(n.J(!1),n.Y)n.ct=t;else{n.Y=!0;try{yield t(),n.J()}catch(t){n.J(!0,!0),console.error(t)}finally{if(n.Y=!1,n.ct){const t=n.ct;n.ct=void 0,yield n.rt(t)}}}}))}}function Ht(t,n,e){if(n){const r=(i=t).startsWith("/")?new URL(new URL(window.location.href).origin+i):new URL(i);return r.searchParams.append(n,e),r.toString()}var i;return t}const Qt=(t,n,e,i)=>{const{sourceFilesUrl:r,useBreadcrumb:o,maxSubMatches:s,searchedTermsParam:c,onLinkClick:l,contentFields:u}=n.uiOptions,f=e.getKVFields("link","_relative_fp","title","h1"),d=function(t,n,e){if(!t||n){const t=e.split("/").map((t=>t.split(/[\s_-]+/g).map((t=>t.replace(/([a-z])([A-Z])/g,"$1 $2"))).map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" "))).join(" ยป ").split(".");let n=t.pop().toUpperCase();return n="HTML"===n?"":"PDF"===n?" (PDF)":"."+n,t.join(".")+n}return t}(f.h1||f.title||"",o,f._relative_fp),h="string"==typeof r,p=f.link||h&&f._relative_fp&&`${r}${f._relative_fp}`||"",m=e.linkHeadingsToContents(...u);!function(t,n){t.sort(((t,n)=>{const e=t.numTerms,i=n.numTerms;return e===i?n.type.localeCompare(t.type)||n.text.length-t.text.length:i-e}));const e=Math.min(t.length,n);let i=0;for(;i"content"===t)).map((t=>t.highlight())),_=m.filter((({type:t})=>t.startsWith("heading"))).map((t=>({content:t.heading?t.highlight():[a()],heading:t.heading?t.heading.highlight(!1):t.highlight(),href:t.headingLink?`${p}#${t.headingLink}`:p}))),b=t("a",{class:"infi-title-link",role:"option",tabindex:"-1"},t("div",{class:"infi-title"},d),...y.map((n=>t("div",{class:"infi-body"},...n))));p&&(b.setAttribute("href",Ht(p,c,i.t)),b.onclick=l);const w=_.map((({content:n,heading:e,href:r})=>{const o=t("a",{class:"infi-heading-link",role:"option",tabindex:"-1"},t("div",{class:"infi-heading"},...e),t("div",{class:"infi-body"},...n));return r&&(o.setAttribute("href",Ht(r,c,i.t)),o.onclick=l),o}));return Promise.resolve(t("div",{class:"infi-list-item",role:"group","aria-label":d},b,...w))},Vt={resultsLabel:"Site results",fsButtonLabel:"Search",fsPlaceholder:"Search this site",fsCloseText:"Close",filtersButton:"Filters",numResultsFound:" results found",startSearching:"Start Searching Above!",startingUp:"... Starting Up ...",error:"Oops! Something went wrong... ๐Ÿ™",navigation:"Navigation",sortBy:"Sort by",tipHeader:"๐Ÿ”Ž Advanced search tips",tip:"Tip",example:"Example",tipRows:{searchPhrases:"Search for phrases",exSearchPhrases:'"for tomorrow"',requireTerm:"Require a term",exRequireTerm:"+sunny weather",excludeTerm:"Exclude a term",exExcludeTerm:"-cloudy sunny",flipResults:"Flip search results",exFlipResults:"~rainy",groupTerms:"Group terms together",exGroupTerms:"~(sunny warm cloudy)",searchPrefixes:"Search for prefixes",exSearchPrefixes:"run*",searchSections:"Search only specific sections",exSearchSections:["title:forecast","heading:sunny","body:(rainy gloomy)"]}};function Gt(){return[c("div",{}),c("div",{class:"infi-filters"}),c("div",{})]}let zt=0;function Jt(t,n,e){t.setAttribute("autocomplete","off"),t.setAttribute("readonly",""),t.setAttribute("role","button"),t.setAttribute("aria-label",e),n&&t.setAttribute("placeholder",n),t.classList.add("infi-button-input")}let Kt=0;class Xt{constructor(t){this.ft=t,this.dt=!1,this.ht=!1}yt(){const{mode:t,isMobileDevice:n}=this.ft.uiOptions;return t===S.Auto&&!n()||t===S.Dropdown}_t(t,n,e,i){const{uiOptions:r}=i,o=new Wt(t,e,n,i);let s=!0;e.setupPromise.catch((()=>s=!1));let c=-1;t.addEventListener("input",(t=>{if(!s)return;const n=r.preprocessQuery(t.target.value);clearTimeout(c),n.length?c=setTimeout((()=>{this.bt&&this.bt(),o.F(n)}),r.inputDebounce):(o.at(),this.yt()&&this.wt())}))}}const Yt=function(t){!function(t){t.searcherOptions=t.searcherOptions||{};const n=t.uiOptions||{};t.uiOptions=Object.assign(Object.assign({mode:S.Auto,inputDebounce:100,isMobileDevice:()=>window.matchMedia("only screen and (max-width: 768px)").matches,preprocessQuery:t=>t,dropdownAlignment:"bottom-end",resultsPerPage:10,maxSubMatches:2,fsScrollLock:!0,fsContainer:document.getElementsByTagName("body")[0],sortFields:{},multiSelectFilters:[],numericFilters:[],listItemRender:Qt,onLinkClick:()=>{},contentFields:["body"]},n),{translations:Object.assign(Object.assign({},Vt),n.translations||{})});const{uiOptions:e}=t;if(e.sourceFilesUrl&&!e.sourceFilesUrl.endsWith("/")&&(e.sourceFilesUrl+="/"),e.mode===S.Target&&("string"==typeof e.target&&(e.target=document.getElementById(e.target)),!e.target))throw new Error("'target' mode specified but no valid target option specified");if("input"in e&&"string"!=typeof e.input||(e.input=document.getElementById(e.input||"infi-search")),[S.Dropdown,S.Target].includes(e.mode)&&!e.input)throw new Error("'dropdown' or 'target' mode specified but no input element found");"string"==typeof e.fsContainer&&(e.fsContainer=document.getElementById(e.fsContainer))}(t);const{uiOptions:n}=t,{input:e,mode:i,dropdownAlignment:r,fsScrollLock:o,target:s,translations:{fsButtonPlaceholder:a,fsButtonLabel:l,resultsLabel:u}}=n,f=new P(t.searcherOptions),d=new Xt(t),[h,p,m,y]=function(t,n){const{translations:{fsPlaceholder:e,fsCloseText:i,resultsLabel:r},fsContainer:o}=t.uiOptions,s=`infi-fs-label-${Kt}`,a=c("input",{class:"infi-fs-input",type:"search",placeholder:e,"aria-labelledby":s,enterkeyhint:"search"});a.onkeydown=t=>{"Escape"===t.key&&a.value&&t.stopPropagation()};const l=c("span",{class:"infi-fs-input-clear"});l.onclick=()=>{a.value&&(a.value="",a.dispatchEvent(new KeyboardEvent("input")),a.focus())};const u=c("button",{class:"infi-input-close-fs",type:"button"},i),f=c("div",{id:"infi-fs-list-"+Kt++,"aria-labelledby":s}),d=c("div",{class:"infi-list",tabindex:"-1"},...Gt(),f),h=c("div",{class:"infi-root infi-fs-root"},c("div",{class:"infi-fs-controls"},c("div",{class:"infi-fs-input-wrapper"},a,l),u),d);h.onclick=t=>t.stopPropagation(),h.onmousedown=t=>t.stopPropagation(),O(a,f,r);const p=c("div",{class:"infi-fs-backdrop"},h);function m(t){n(t),p.remove()}return p.onmousedown=()=>m(!1),p.onkeydown=t=>{"Escape"===t.code&&(t.stopPropagation(),m(!0))},u.onclick=t=>{t.preventDefault(),m(""===t.pointerType)},[d,a,function(){o.appendChild(p),a.focus();const t=f.querySelector(".focus");t&&d.scrollTo({top:t.offsetTop-d.offsetTop-30})},m]}(t,(t=>{t&&e&&e.focus(),d.ht=!1,o&&(document.body.style.overflow="")}));function _(){d.ht||(m(),d.ht=!0,o&&(document.body.style.overflow="hidden"))}function b(){y(!1),o&&(document.body.style.overflow="")}function w(){function t(){d.yt()||_()}e.addEventListener("click",t),e.addEventListener("keydown",(n=>{"Enter"===n.key&&t()}))}if(d._t(p,h,f,t),!e||i!==S.Auto&&i!==S.Dropdown)e&&i===S.Fullscreen?(Jt(e,a,l),w()):e&&i===S.Target&&(!function(t,n,e){e.classList.add("infi-root");const i=c("div",{id:"infi-target-list-"+zt++});e.append(...Gt(),i),O(n,i,t.uiOptions.translations.resultsLabel)}(t,e,s),d._t(e,s,f,t));else{const g=e.getAttribute("placeholder")||"",v=e.parentElement,x=v.childNodes;let k=0;for(;k{"Escape"===t.code&&(t.stopPropagation(),n.focus(),e())},[s,r]}(0,e,(()=>{d.wt()}));k{e.value&&(!function(t,n,e,i){const r=n.children[1],o=r.firstElementChild;r.style.display="block",Ft(t,r,{placement:i,middleware:[et({padding:10,mainAxis:!1}),it({apply({availableWidth:t,availableHeight:n}){Object.assign(e.style,{maxWidth:`min(${t}px, var(--infi-dropdown-max-width))`,maxHeight:`min(${n}px, var(--infi-dropdown-max-height))`})},padding:10}),J({element:o})]}).then((({x:t,y:n,middlewareData:e})=>{Object.assign(r.style,{left:`${t}px`,top:`${n}px`});const{x:i}=e.arrow;Object.assign(o.style,{left:null!=i?`${i}px`:""})}))}(e,A,E,r),d.dt=!0)},d.wt=()=>{A.children[1].style.display="none",d.dt=!1},d._t(e,E,f,t);const j=E.children[3];function q(){d.yt()?(b(),(d.dt||document.activeElement===e)&&d.bt(),function(t,n,e,i){!function(t,n){t.removeAttribute("readonly"),t.removeAttribute("role"),t.removeAttribute("aria-label"),t.setAttribute("placeholder",n),t.classList.remove("infi-button-input")}(t,i),O(t,n,e)}(e,j,u,g)):(d.wt(),function(t,n,e,i){n.removeAttribute("role"),n.removeAttribute("aria-label"),t.removeAttribute("role"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-autocomplete"),t.removeAttribute("aria-controls"),$(t),Jt(t,i,e)}(e,j,l,a))}let T;q(),window.addEventListener("resize",(()=>{clearTimeout(T),T=setTimeout(q,10)})),A.addEventListener("focusout",(()=>{d.yt()&&setTimeout((()=>{let t=document.activeElement;for(;t;)if(t=t.parentElement,t===A)return;d.wt()}),100)})),e.addEventListener("focus",(()=>{!d.dt&&d.yt()&&d.bt()})),w()}return{showFullscreen:_,hideFullscreen:b}},Zt={init:Yt,Searcher:P};return n=n.default})()));